diff -Nru cdrtools-3.00~trusty~mc3man1/ABOUT cdrtools-3.01a26~trusty/ABOUT --- cdrtools-3.00~trusty~mc3man1/ABOUT 2008-10-12 18:29:01.000000000 +0000 +++ cdrtools-3.01a26~trusty/ABOUT 2010-06-03 09:55:18.000000000 +0000 @@ -1,7 +1,8 @@ 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 @@ -24,14 +25,14 @@ - isovfy verify an ISO-9660 image - readcd (a stripped down version of scgskeleton) - By Jörg Schilling joerg.schilling@fokus.fraunhofer.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 joerg.schilling@fokus.fraunhofer.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 joerg.schilling@fokus.fraunhofer.de and + By Jörg Schilling joerg.schilling@fokus.fraunhofer.de diff -Nru cdrtools-3.00~trusty~mc3man1/AN-3.01a01 cdrtools-3.01a26~trusty/AN-3.01a01 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a01 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a01 2010-11-25 10:22:24.000000000 +0000 @@ -0,0 +1,244 @@ +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-3.01a01: + +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 + cosolidation as GCC id too dumb for the printf() extensions. + +- All include files (even those created by autoconf) are now protected + against multiple includion. + +- 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 workyround for platforms + that do not have wcwidth(). + +- Make NLS the default (i.e. gettext() is called in case that schily/nlsdefs.h + was included) + + +Libschily: + +- libschily/?eterrno.c no longer overwrite the _TS_ERRNO definition + in order to pass the compile constrints in the Solaris ON consoliation. + +- Several new global symbols in the mapfile for libschily/libschily-mapvers + +- libschily/wcsndup.c had frgotten 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 linschily + 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 out 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 out 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. + + +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): + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +- New functions: find_hasprint() and find_hasexec() + +Libfile: + +Libhfs_iso: + +Libsiconv: + +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 + +Libscgcmd: + +Libmdigest: + +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 + + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- Fixed a typo in cdda2wav/cdda2ogg.1 (man page) + +Readcd: + +Scgcheck: + +Scgskeleton: + +Btcflash: + +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 superfluious 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 and (via libfind) 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. + + + 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-3.00~trusty~mc3man1/AN-3.01a02 cdrtools-3.01a26~trusty/AN-3.01a02 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a02 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a02 2010-12-21 10:43:21.000000000 +0000 @@ -0,0 +1,151 @@ +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-3.01a02: + +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. ***** + +All: + +- include/schily/nlsdefs.h now includes macros _(s) and __(s) to support + gettext() and xgettext(1) + +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): + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + +Libsiconv: + +- new function sic_base() returns the dynamically retrieved install base + for the siconv database. + +Libscg: + +Libscgcmd: + +Libmdigest: + +Rscsi: + +Cdrecord: + +- Cdrecord now uses gettext() to translate texts. + There are currently not yet translated texts. The cdrtools project needs help + with translating the texts. + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- Cdda2wav now uses gettext() to translate texts. + There are currently not yet translated texts. The cdrtools project needs help + with translating the texts. + +Readcd: + +- Readcd now uses gettext() to translate texts. + There are currently not yet translated texts. The cdrtools project needs help + with translating the texts. + +Scgcheck: + +- Scgcheck now uses gettext() to translate texts. + There are currently not yet translated texts. The cdrtools project needs help + with translating the texts. + +Scgskeleton: + +- Scgskeleton now uses gettext() to translate texts. + There are currently not yet translated texts. The cdrtools project needs help + with translating the texts. + +Btcflash: + +- Btcflash now uses gettext() to translate texts. + There are currently not yet translated texts. The cdrtools project needs help + with translating the texts. + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- Mkisofs and the disgnostic programs now use gettext() to translate texts. + There are currently not yet translated texts. The cdrtools project needs help + with translating the texts. + + 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-3.00~trusty~mc3man1/AN-3.01a03 cdrtools-3.01a26~trusty/AN-3.01a03 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a03 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a03 2011-03-07 23:02:15.000000000 +0000 @@ -0,0 +1,132 @@ +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-3.01a03: + +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. ***** + +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): + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + +Libsiconv: + +Libscg: + +- 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 + +Libscgcmd: + +Libmdigest: + +Rscsi: + +Cdrecord: + +- cdrecord now warns and aborts if someone tries to write more CD-Text + for a single language than permitted by the standard. + + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- many typo fixes to the cdda2wav.1 man page, thanks to John Bradshaw + +Readcd: + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- Add several forgotten options to the mkisofs 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: + - 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-3.00~trusty~mc3man1/AN-3.01a04 cdrtools-3.01a26~trusty/AN-3.01a04 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a04 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a04 2011-04-12 09:33:25.000000000 +0000 @@ -0,0 +1,126 @@ +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-3.01a04: + +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. ***** + +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): + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +- New flag WALK_STRIPLDOT to strip leading "./" like star does + +Libfile: + +Libhfs_iso: + +Libsiconv: + +Libscg: + +Libscgcmd: + +Libmdigest: + +Rscsi: + +Cdrecord: + +- cdrecord now warns about the correct max. CD-Text size + for a single language that is permitted by the standard. + + +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): + +- Fixed several typos in the mkisofs man page and in mkisofs + + + 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-3.00~trusty~mc3man1/AN-3.01a05 cdrtools-3.01a26~trusty/AN-3.01a05 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a05 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a05 2011-06-05 12:45:25.000000000 +0000 @@ -0,0 +1,153 @@ +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-3.01a04: + +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. ***** + +All: + +- The makefile system now by default disables smake Simple Suffix Rules + and the POSIX Suffix Rules in order to speed up inference rule search. + +Libschily: + +- New functions mkgmtime() mklgmtime() and timegm() + +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): + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +- 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() + +Libfile: + +Libhfs_iso: + +Libsiconv: + +Libscg: + +Libscgcmd: + +Libmdigest: + +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 now correctly supports El Torito multi boot entries by introducing + a Boot Dection 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" + + + 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-3.00~trusty~mc3man1/AN-3.01a06 cdrtools-3.01a26~trusty/AN-3.01a06 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a06 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a06 2011-09-14 13:29:42.000000000 +0000 @@ -0,0 +1,374 @@ +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-3.01a06: + +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. + +All: + +- 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 autocof 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 + MKLINS 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 MKLNKS to verify whether mingw + supports symlinks + +- MKLINKS now creates copies instead of symlink when we use MSC + as MSC does not support to read symlinks 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 65 + 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 comands. 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 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 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. + +Libschily: + +- 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 + +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): + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +- libfind/find.c disables -exec in case there is no fork(). + This is in order to support MINGW + +Libfile: + +Libhfs_iso: + +Libsiconv: + +Libscg: + +- 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. + +Libscgcmd: + +Libmdigest: + +Rscsi: + +Cdrecord: + +- Several changes to support mingw and MSC + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- Several changes to support mingw and MSC + +Readcd: + +- Better algorithm for -edc-corr + +Scgcheck: + +- Several changes to support mingw and MSC + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- The mkisofs diagnostic tools now support MSC that does not support + POSIX terminal handling. + + 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-3.00~trusty~mc3man1/AN-3.01a07 cdrtools-3.01a26~trusty/AN-3.01a07 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a07 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a07 2012-02-29 14:11:42.000000000 +0000 @@ -0,0 +1,280 @@ +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-3.01a07: + +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. + +All: + +- 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 fot 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) to 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* + + +Libschily: + +- 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. + + +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): + +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. + +Libfind: + +- libfind/walk.c now uses O_SEARCH to open directories + +Libfile: + +Libhfs_iso: + +Libsiconv: + +Libscg: + + +Libscgcmd: + +Libmdigest: + +Rscsi: + +Cdrecord: + +- 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. + + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- 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. + + +Readcd: + +- 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. + + +Scgcheck: + + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + + 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-3.00~trusty~mc3man1/AN-3.01a08 cdrtools-3.01a26~trusty/AN-3.01a08 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a08 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a08 2012-08-15 09:58:27.000000000 +0000 @@ -0,0 +1,159 @@ +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-3.01a08: + +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. + +All: + +- 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 + +Libschily: + +- getperm.c now correctly supports umask +w + +- Libschily is now linked against $(LIB_INTL) when a shared libschily + is created. + +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): + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + +Libsiconv: + +Libscg: + +- 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 + + +Libscgcmd: + +Libmdigest: + +- Cygwin is broken, when using #pragma weak, so we cannot create + weak symbols on Cygwin for sha2.c + +Rscsi: + +Cdrecord: + +- 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 + + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +Readcd: + +- Cygwin is broken, when using #pragma weak, so we cannot create + weak symbols on Cygwin for sha2.c + + +Scgcheck: + + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- 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. + + 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-3.00~trusty~mc3man1/AN-3.01a09 cdrtools-3.01a26~trusty/AN-3.01a09 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a09 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a09 2012-12-02 22:54:33.000000000 +0000 @@ -0,0 +1,157 @@ +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-3.01a09: + +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. + +All: + +- 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 + +Libschily: + +- Avoid warnings from cl.exe for libschily/gettimeofday.c + +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): + +- Some cstyle changes + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + +Libmdigest: + +- Some cstyle changes + +Libsiconv: + +Libscg: + +- Some cstyle changes + +Libscgcmd: + +Libmdigest: + +- CSTYLED comment added + +Rscsi: + +Cdrecord: + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- Better handling of CLONE AREAs on newer Haiku versions. + +- Some cstyle changes + +Readcd: + +Scgcheck: + + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- 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. + + 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-3.00~trusty~mc3man1/AN-3.01a10 cdrtools-3.01a26~trusty/AN-3.01a10 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a10 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a10 2012-12-17 12:33:15.000000000 +0000 @@ -0,0 +1,139 @@ +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-3.01a10: + +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. + +All: + +- 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. + + +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): + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + +Libmdigest: + +Libsiconv: + +Libscg: + +Libscgcmd: + +Libmdigest: + +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): + +- 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. + + 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-3.00~trusty~mc3man1/AN-3.01a11 cdrtools-3.01a26~trusty/AN-3.01a11 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a11 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a11 2013-01-08 16:43:36.000000000 +0000 @@ -0,0 +1,152 @@ +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-3.01a11: + +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. + +All: + +- 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 + + +Libschily: + +- Better comment in comerr.c to help to understand exit() code folding + to 8 bits and how it may be avoided. + +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): + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + +Libmdigest: + +Libsiconv: + +Libscg: + +- For newer Cygwin versions, we need an own PACKED definition in + libscg/scg/aspi-win32.h + +Libscgcmd: + +Libmdigest: + +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): + + 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-3.00~trusty~mc3man1/AN-3.01a12 cdrtools-3.01a26~trusty/AN-3.01a12 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a12 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a12 2013-02-11 11:24:36.000000000 +0000 @@ -0,0 +1,155 @@ +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-3.01a12: + +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. + +All: + +- The Schily makefilesystem now supports CC++_COM for all platforms to + allow to overwrite the low level command for the C++-compiler. + +Libschily: + +- 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. + +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): + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + +Libmdigest: + +Libsiconv: + +Libscg: + +Libscgcmd: + +Libmdigest: + +Rscsi: + +Cdrecord: + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- 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. + +Readcd: + +- avoid a GCC warning when compiling readcd.c + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- 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. + + 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: + + - Make sure the time stamps are always correct for UDF + + - Support correct uid/gid for UDF symlinks + + - Support UDF hardlinks and correct linkcounts + + - 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-3.00~trusty~mc3man1/AN-3.01a13 cdrtools-3.01a26~trusty/AN-3.01a13 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a13 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a13 2013-02-15 10:16:11.000000000 +0000 @@ -0,0 +1,159 @@ +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-3.01a13: + +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. + +All: + +- include/schily/stat.h now contains macros to set the nanoseconds + in timestamps in a OS independent way + +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): + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + +Libmdigest: + +Libsiconv: + +Libscg: + +Libscgcmd: + +Libmdigest: + +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 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 + + + 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: + +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-3.00~trusty~mc3man1/AN-3.01a14 cdrtools-3.01a26~trusty/AN-3.01a14 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a14 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a14 2013-04-22 13:51:05.000000000 +0000 @@ -0,0 +1,212 @@ +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-3.01a14: + +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. + +All: + +- 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. + +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): + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + +Libmdigest: + +Libsiconv: + +Libscg: + +- 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. + +Libscgcmd: + +Libmdigest: + +Rscsi: + +Cdrecord: + +- 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. + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- 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. + +Readcd: + +- 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. + +Scgcheck: + +- Link now against $(LIB_CAP) also as librscg needs it on Linux + +Scgskeleton: + +- Link now against $(LIB_CAP) also as librscg needs it on Linux + +Btcflash: + +- 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): + +- -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 + + + 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: + +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-3.00~trusty~mc3man1/AN-3.01a15 cdrtools-3.01a26~trusty/AN-3.01a15 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a15 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a15 2013-05-31 14:35:32.000000000 +0000 @@ -0,0 +1,242 @@ +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-3.01a15: + +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. + +All: + +- 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. + +Libschily: + +- Added #include to libschily/fnmatch.c + +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): + +- Added #include + +Libcdrdeflt: + +Libdeflt: + +- Added #include + +Libfind: + +- dirname -> dir_name to avoid a gcc warning + +Libfile: + +Libhfs_iso: + +- Rename variable "utime" to "uxtime" to avoid a compiler warning + +Libmdigest: + +Libsiconv: + +Libscg: + +- 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 comand was aborted with errno == EPERM. + +Libscgcmd: + +Libmdigest: + +Rscsi: + +Cdrecord: + +- 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. + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- 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 + + +Readcd: + +- Allow to compile without Linux libcap using "smake COPTX=-DNO_LINUX_CAPS LIB_CAP=" + +- Readcd now checks whether there are sufficient fine grained privileges. + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- Make mkisofs compile without -DUDF and without -DDVD_VIDEO + Thanks to a hint from rmd4work@mail.ru + + + 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: + +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-3.00~trusty~mc3man1/AN-3.01a16 cdrtools-3.01a26~trusty/AN-3.01a16 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a16 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a16 2013-07-10 09:23:28.000000000 +0000 @@ -0,0 +1,168 @@ +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-3.01a15: + +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. + +All: + +- 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 + + + +Libschily: + + +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. + + +Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + + +Libcdrdeflt: + +Libdeflt: + + +Libfind: + + +Libfile: + +Libhfs_iso: + + +Libmdigest: + +Libsiconv: + +Libscg: + + +Libscgcmd: + +Libmdigest: + +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): + + 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: + +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-3.00~trusty~mc3man1/AN-3.01a17 cdrtools-3.01a26~trusty/AN-3.01a17 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a17 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a17 2013-07-30 20:36:22.000000000 +0000 @@ -0,0 +1,182 @@ +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-3.01a17: + +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. + +All: + +- 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__ + + +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): + + +Libcdrdeflt: + +Libdeflt: + + +Libfind: + + +Libfile: + +Libhfs_iso: + + +Libmdigest: + +- 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__ + +Libsiconv: + +Libscg: + +- 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: + +Libmdigest: + +Rscsi: + +Cdrecord: + +- 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__ + + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- 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__ + +Readcd: + + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + + 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: + +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-3.00~trusty~mc3man1/AN-3.01a18 cdrtools-3.01a26~trusty/AN-3.01a18 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a18 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a18 2013-10-12 17:08:31.000000000 +0000 @@ -0,0 +1,165 @@ +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-3.01a18: + +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. + +All: + +- 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. + +Libschily: + +- 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() + + +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): + + +Libcdrdeflt: + +Libdeflt: + +- Added defltsect() to the list of exported functions for the + shared library version + +Libfind: + +- Fixed a filedesrciptor leak in libfind that hits when using + -empty on empty directories. + +Libfile: + +Libhfs_iso: + + +Libmdigest: + +Libsiconv: + +Libscg: + + +Libscgcmd: + +Libmdigest: + +Rscsi: + +Cdrecord: + +- Typo correction in a comment + + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- Typo correction in a comment + +- Fixed fine grained privilege handling for Linux. + Thanks for Daniel Pielmeier from Gentoo for reporting and testing. + +Readcd: + +- Typo correction in a comment + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + + 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: + +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-3.00~trusty~mc3man1/AN-3.01a19 cdrtools-3.01a26~trusty/AN-3.01a19 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a19 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a19 2013-11-22 12:31:29.000000000 +0000 @@ -0,0 +1,257 @@ +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-3.01a19: + +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. + +All: + +- 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 un RULES/rules.top. It is + still possible to provice 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 fir the Microsoft C compiler, as there are the same + autoconf detection problems. + +- Addded missing include/schily/err_type.h + +- New file include/schily/shedit.h + +Libschily: + +- 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 + + + +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): + + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +- Libfind now allows to check for -type P (Solaris event port). + A missing "case 'P':" was added to the parser. + +Libfile: + +Libhfs_iso: + + +Libmdigest: + +Libsiconv: + +Libscg: + + +Libscgcmd: + +Libmdigest: + +Rscsi: + +Cdrecord: + +- 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. + + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- 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(). + +Readcd: + +- 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. + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + + 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: + +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-3.00~trusty~mc3man1/AN-3.01a20 cdrtools-3.01a26~trusty/AN-3.01a20 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a20 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a20 2013-12-26 18:48:51.000000000 +0000 @@ -0,0 +1,197 @@ +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-3.01a20: + +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. + +All: + +- New Schily Makefiles rules for armv7l-linux + +- autoconf/xconfig.h.in now treats MinGW32 the same as when compiling + with cl.exe + +Libschily: + +- 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 + + +Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): + +- 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 adopted to the current constraints. + +Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + + +Libmdigest: + +Libsiconv: + +Libscg: + + +Libscgcmd: + +Libmdigest: + +Rscsi: + +Cdrecord: + +- Fixed some typos in cdrecord + +- Better comment about cdrecord specific enhancements in CUE files. + + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- 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 computaion + of the percentage of bad sectors now takes care of reread 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 + +Readcd: + +- readcd -c2scan now also prints the percentage of sectors with C2 errors. + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- Fixed a typo in the mkisofs man page (had \-max\-ISO-9660\-filenames + instead of \-max\-iso9660\-filenames) + + + 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: + +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-3.00~trusty~mc3man1/AN-3.01a21 cdrtools-3.01a26~trusty/AN-3.01a21 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a21 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a21 2014-01-03 22:00:03.000000000 +0000 @@ -0,0 +1,197 @@ +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-3.01a21: + +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. + +All: + +- 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. + +Libschily: + +- 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 + +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): + + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + + +Libmdigest: + +Libsiconv: + +Libscg: + + +Libscgcmd: + +Libmdigest: + +Rscsi: + +Cdrecord: + +- cdrecord/cue.c now has a better comment related to cdrtools specific + CUE enhancements. + +- Fixed a typo in cdrecord.dfl + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- 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 + +Readcd: + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- 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. + + 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: + +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-3.00~trusty~mc3man1/AN-3.01a22 cdrtools-3.01a26~trusty/AN-3.01a22 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a22 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a22 2014-01-20 11:10:44.000000000 +0000 @@ -0,0 +1,175 @@ +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-3.01a22: + +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. + +All: + +- 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 comment 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() + + +Libschily: + +- 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. + +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): + + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + + +Libmdigest: + +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 + +Libscg: + + +Libscgcmd: + +Libmdigest: + +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): + +- 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 + + 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: + +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-3.00~trusty~mc3man1/AN-3.01a23 cdrtools-3.01a26~trusty/AN-3.01a23 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a23 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a23 2014-03-04 10:27:02.000000000 +0000 @@ -0,0 +1,163 @@ +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-3.01a23: + +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. + +All: + +- Typo fix in README.compile for the mail address. + Thanks to Dennis Clarke for the catch! + + +Libschily: + +- libschily/sleep.c and libschily/usleep.c have been modified to work + with MinGW. + + +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): + + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + + +Libmdigest: + +Libsiconv: + + +Libscg: + + +Libscgcmd: + +Libmdigest: + +Rscsi: + +Cdrecord: + +- 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. + + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- 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. + +Readcd: + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- 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. + + + 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: + +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-3.00~trusty~mc3man1/AN-3.01a24 cdrtools-3.01a26~trusty/AN-3.01a24 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a24 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a24 2014-05-07 10:34:14.000000000 +0000 @@ -0,0 +1,335 @@ +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-3.01a24: + +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 ftp://ftp.berlios.de/pub/schily/ or + *** from https://sourceforge.net/projects/schilytools/files/ and call: + + cd ./psmake + ./MAKE-all + cd .. + psmake/smake + psmake/smake install + + 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 am 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 thouroughly. + Please report problems! + + +All: + +- 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 + +Libschily: + +- 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. + +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): + + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + + +Libmdigest: + +Libsiconv: + + +Libscg: + + +Libscgcmd: + +Libmdigest: + +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): + + 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 us 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 alls files (in case that + -find is not used) or files secected by a -find expression. Note that + -find expressions may include -chown, -chgrp and -chmod to modify the + meta data of files. + + 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: + +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-3.00~trusty~mc3man1/AN-3.01a25 cdrtools-3.01a26~trusty/AN-3.01a25 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a25 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a25 2014-09-30 12:38:03.000000000 +0000 @@ -0,0 +1,197 @@ +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-3.01a25: + +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 ftp://ftp.berlios.de/pub/schily/ or + *** from https://sourceforge.net/projects/schilytools/files/ and call: + + cd ./psmake + ./MAKE-all + cd .. + psmake/smake + psmake/smake install + + 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 am 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 thouroughly. + Please report problems! + + +All: + +- 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. + +Libschily: + +- 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 the 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 + + + +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): + + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + + +Libmdigest: + +Libsiconv: + + +Libscg: + + +Libscgcmd: + +Libmdigest: + +Rscsi: + +Cdrecord: + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- Flush stderr before a question in cdda2wav. This is a workaround + for a Linux libc bug (stderr must be unbuffered acording to the + standard). + +Readcd: + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- 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 + + + 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: + +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-3.00~trusty~mc3man1/AN-3.01a26 cdrtools-3.01a26~trusty/AN-3.01a26 --- cdrtools-3.00~trusty~mc3man1/AN-3.01a26 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/AN-3.01a26 2014-12-15 16:00:59.000000000 +0000 @@ -0,0 +1,168 @@ +***************** Important news **************************** + +For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM + +***************** Please Test ********************************* + +NEW features of cdrtools-3.01a26: + +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. + + 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 am 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 thouroughly. + Please report problems! + + +All: + +- 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. + + +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): + + +Libcdrdeflt: + +Libdeflt: + +Libfind: + +Libfile: + +Libhfs_iso: + + +Libmdigest: + +Libsiconv: + + +Libscg: + + +Libscgcmd: + +Libmdigest: + +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): + + + 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-3.00~trusty~mc3man1/autoconf/acgeneral.m4 cdrtools-3.01a26~trusty/autoconf/acgeneral.m4 --- cdrtools-3.00~trusty~mc3man1/autoconf/acgeneral.m4 2010-04-30 20:04:28.000000000 +0000 +++ cdrtools-3.01a26~trusty/autoconf/acgeneral.m4 2011-08-02 18:18:27.000000000 +0000 @@ -1,4 +1,4 @@ -dnl @(#)acgeneral.m4 1.12 10/04/30 Copyright 1998-2009 J. Schilling +dnl @(#)acgeneral.m4 1.15 11/08/02 Copyright 1998-2011 J. Schilling dnl dnl Parameterized macros. dnl Requires GNU m4. @@ -55,6 +55,7 @@ changequote([, ]) define(AC_ACVERSION, 2.13) +define(AC_ACVERSION_SCHILY, 1.15-Schily) dnl Some old m4's don't support m4exit. But they provide dnl equivalent functionality by core dumping because of the @@ -148,8 +149,9 @@ 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 [ +# Generated automatically using autoconf version] AC_ACVERSION AC_ACVERSION_SCHILY [ # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Copyright (C) 1998-2011 J. Schilling # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -187,6 +189,9 @@ srcdir= target=NONE verbose= +rmttest=test +rmtcall= +CONFIG_RMTCALL=${CONFIG_RMTCALL-NONE} x_includes=NONE x_libraries=NONE dnl Installation directory options. @@ -505,7 +510,7 @@ verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version AC_ACVERSION" + echo "configure generated by autoconf version AC_ACVERSION AC_ACVERSION_SCHILY" exit 0 ;; -with-* | --with-*) @@ -1210,7 +1215,7 @@ dnl AC_MSG_RESULT(RESULT-DESCRIPTION) define(AC_MSG_RESULT, -[echo "$ac_t""$1" 1>&AC_FD_MSG]) +[eval echo "$ac_t""$1" 1>&AC_FD_MSG]) dnl AC_VERBOSE(RESULT-DESCRIPTION) define(AC_VERBOSE, @@ -1238,6 +1243,11 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$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() @@ -1249,6 +1259,11 @@ ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$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() @@ -1258,6 +1273,11 @@ ac_compile='${F77-f77} -c $FFLAGS conftest.$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. @@ -1830,7 +1850,7 @@ ])dnl [$1] EOF -if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null then dnl Don't remove the temporary files here, so they can be examined. ifelse([$2], , :, [$2]) @@ -1892,7 +1912,7 @@ )dnl AC_MSG_ERROR(Cannot check for file existence when cross compiling) else - if test -r $1; then + if $rmttest -r $1; then eval "ac_cv_file_$ac_safe=yes" else eval "ac_cv_file_$ac_safe=no" @@ -2196,7 +2216,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 AC_ACVERSION" + 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 ;; diff -Nru cdrtools-3.00~trusty~mc3man1/autoconf/aclocal.m4 cdrtools-3.01a26~trusty/autoconf/aclocal.m4 --- cdrtools-3.00~trusty~mc3man1/autoconf/aclocal.m4 2010-04-26 17:05:39.000000000 +0000 +++ cdrtools-3.01a26~trusty/autoconf/aclocal.m4 2014-03-24 15:53:14.000000000 +0000 @@ -1,4 +1,4 @@ -dnl @(#)aclocal.m4 1.89 10/04/26 Copyright 1998-2009 J. Schilling +dnl @(#)aclocal.m4 1.101 14/03/24 Copyright 1998-2014 J. Schilling dnl Set VARIABLE to VALUE in C-string form, verbatim, or 1. dnl AC_DEFINE_STRING(VARIABLE [, VALUE]) @@ -32,7 +32,7 @@ #if HAVE_STDDEF_H || STDC_HEADERS #include #endif -$1], ac_cv_have_type_$2=yes, ac_cv_have_type_$2=no)])dnl +$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___%'` @@ -56,6 +56,41 @@ 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], @@ -262,9 +297,10 @@ 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 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 @@ -272,9 +308,9 @@ 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])]) +[ 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 @@ -286,21 +322,31 @@ 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_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], - [ac_cv_have_$2=yes], - [ac_cv_have_$2=no])]) + [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 test $ac_cv_have_$2 = yes; then +if eval "test \"`echo '$ac_cv_have_'$2`\" = yes"; then AC_DEFINE_UNQUOTED($ac_tr_dfunc) -fi]) +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]]]) @@ -318,6 +364,7 @@ [ #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") @@ -381,6 +428,14 @@ 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. @@ -860,7 +915,7 @@ 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;], + [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 @@ -976,6 +1031,38 @@ 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], @@ -1013,7 +1100,7 @@ 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];], +[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 @@ -1061,6 +1148,42 @@ 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], @@ -1138,6 +1261,29 @@ 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], @@ -1326,7 +1472,7 @@ 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;], + [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 @@ -1345,7 +1491,7 @@ #include #endif #endif], - [siginfo_t si; si.si_signo = 0;], + [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 @@ -1357,7 +1503,7 @@ 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;], + [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 @@ -1757,9 +1903,9 @@ fi]) AC_DEFUN([jsAC_FUNC_MMAP], -[AC_REQUIRE([AC_MMAP_SIZEP])dnl -AC_CHECK_HEADERS(unistd.h) -AC_CHECK_FUNCS(getpagesize) +[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. @@ -1914,8 +2060,8 @@ ]) AC_DEFUN([AC_MMAP_SIZEP], -[AC_CHECK_HEADERS(unistd.h) -AC_CHECK_FUNCS(getpagesize) +[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 @@ -2447,6 +2593,45 @@ 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 %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], @@ -2740,6 +2925,43 @@ 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 XXXXXXXXXXXXXXXXXX Begin Stolen (but modified) from GNU tar XXXXXXXXXXXXXXXXXXXXXXXXXXX dnl Changes: @@ -2919,7 +3141,8 @@ 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([#pragma weak test2 = test1 + [AC_TRY_LINK([extern int test2(); +#pragma weak test2 = test1 int test1() {return 0;}], [return test2();], [ac_cv_pragma_weak=yes], diff -Nru cdrtools-3.00~trusty~mc3man1/autoconf/acspecific.m4 cdrtools-3.01a26~trusty/autoconf/acspecific.m4 --- cdrtools-3.00~trusty~mc3man1/autoconf/acspecific.m4 2010-02-28 14:31:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/autoconf/acspecific.m4 2012-04-09 14:47:53.000000000 +0000 @@ -1,4 +1,4 @@ -dnl @(#)acspecific.m4 1.13 10/02/28 Copyright 1998-2009 J. Schilling +dnl @(#)acspecific.m4 1.16 12/04/09 Copyright 1998-2011 J. Schilling dnl dnl Macros that test for specific features. dnl This file is part of Autoconf. @@ -208,11 +208,25 @@ 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, @@ -228,6 +242,11 @@ 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 @@ -252,8 +271,33 @@ 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. @@ -2711,6 +2755,10 @@ 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]) @@ -2728,6 +2776,7 @@ 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 @@ -2738,7 +2787,7 @@ if test $ret = 127 -a -n "$nf" ; then # Korn Shell ccout="" fi - if test ! -n "$ccout" ; then + 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.]) diff -Nru cdrtools-3.00~trusty~mc3man1/autoconf/config.guess cdrtools-3.01a26~trusty/autoconf/config.guess --- cdrtools-3.00~trusty~mc3man1/autoconf/config.guess 2009-10-31 14:52:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/autoconf/config.guess 2014-04-24 20:03:12.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/sh -# @(#)config.guess 1.15 09/10/31 Copyright 1999-2009 J. Schilling +# @(#)config.guess 1.16 14/04/24 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. @@ -855,6 +855,9 @@ "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 ;; diff -Nru cdrtools-3.00~trusty~mc3man1/autoconf/configure cdrtools-3.01a26~trusty/autoconf/configure --- cdrtools-3.00~trusty~mc3man1/autoconf/configure 2010-05-07 17:01:34.000000000 +0000 +++ cdrtools-3.01a26~trusty/autoconf/configure 2014-05-15 19:05:10.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in 1.211 +# From configure.in 1.257 @@ -38,6 +38,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -285,8 +309,9 @@ # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 +# Generated automatically using autoconf version 2.13 1.15-Schily # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Copyright (C) 1998-2011 J. Schilling # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -317,6 +342,9 @@ srcdir= target=NONE verbose= +rmttest=test +rmtcall= +CONFIG_RMTCALL=${CONFIG_RMTCALL-NONE} x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' @@ -622,7 +650,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.15-Schily" exit 0 ;; -with-* | --with-*) @@ -794,6 +822,11 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$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= @@ -838,7 +871,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:842: checking host system type" >&5 +echo "configure:875: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -856,11 +889,11 @@ 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 echo $ac_n "checking if sh is bash""... $ac_c" 1>&6 -echo "configure:864: checking if sh is bash" >&5 +echo "configure:897: 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 @@ -874,7 +907,7 @@ fi -echo "$ac_t""$ac_cv_shell_is_bash" 1>&6 +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 @@ -882,7 +915,7 @@ fi echo $ac_n "checking if /bin/sh is bash""... $ac_c" 1>&6 -echo "configure:886: checking if /bin/sh is bash" >&5 +echo "configure:919: 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 @@ -896,7 +929,7 @@ fi -echo "$ac_t""$ac_cv_bin_shell_is_bash" 1>&6 +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 @@ -904,7 +937,7 @@ fi echo $ac_n "checking whether sh -ce is broken""... $ac_c" 1>&6 -echo "configure:908: checking whether sh -ce is broken" >&5 +echo "configure:941: 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 @@ -918,7 +951,7 @@ fi -echo "$ac_t""$ac_cv_shell_ce_is_broken" 1>&6 +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 @@ -926,7 +959,7 @@ fi echo $ac_n "checking whether /bin/sh -ce is broken""... $ac_c" 1>&6 -echo "configure:930: checking whether /bin/sh -ce is broken" >&5 +echo "configure:963: 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 @@ -940,7 +973,7 @@ fi -echo "$ac_t""$ac_cv_bin_shell_ce_is_broken" 1>&6 +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 @@ -948,7 +981,7 @@ fi echo $ac_n "checking whether /bin/bosh is a working shell""... $ac_c" 1>&6 -echo "configure:952: checking whether /bin/bosh is a working shell" >&5 +echo "configure:985: 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 @@ -967,7 +1000,7 @@ fi -echo "$ac_t""$ac_cv_bin_shell_bosh" 1>&6 +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 @@ -975,7 +1008,7 @@ fi echo $ac_n "checking whether /opt/schily/bin/bosh is a working shell""... $ac_c" 1>&6 -echo "configure:979: checking whether /opt/schily/bin/bosh is a working shell" >&5 +echo "configure:1012: 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 @@ -994,21 +1027,309 @@ fi -echo "$ac_t""$ac_cv_opt_schily_bin_shell_bosh" 1>&6 +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 -echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1006: checking for object suffix" >&5 +# 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:1041: 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:1070: 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:1100: 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:1151: 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:1183: 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_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 1199 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:1204: \"$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_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:1244: 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:1254: 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:1282: 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:1327: 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:1012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1021,17 +1342,17 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_objext" 1>&6 +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:1030: checking for Cygwin environment" >&5 +echo "configure:1351: 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 +if { (eval echo configure:1367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -1055,23 +1376,23 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_cygwin" 1>&6 +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:1063: checking for mingw32 environment" >&5 +echo "configure:1384: 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 +if { (eval echo configure:1396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -1084,23 +1405,23 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_mingw32" 1>&6 +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:1092: checking for EMX/OS2 environment" >&5 +echo "configure:1413: 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 +if { (eval echo configure:1425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_emxos2=yes else @@ -1113,7 +1434,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_emxos2" 1>&6 +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 @@ -1131,7 +1452,7 @@ echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1135: checking for executable suffix" >&5 +echo "configure:1456: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1142,10 +1463,11 @@ rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1467: \"$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 @@ -1156,7 +1478,7 @@ if test $ret = 127 -a -n "$nf" ; then # Korn Shell ccout="" fi - if test ! -n "$ccout" ; then + 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; } @@ -1179,17 +1501,17 @@ 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 +eval echo "$ac_t""${ac_cv_exeext}" 1>&6 echo $ac_n "checking for executable calling suffix""... $ac_c" 1>&6 -echo "configure:1185: checking for executable calling suffix" >&5 -echo "$ac_t""${ac_cv_xexeext}" 1>&6 +echo "configure:1507: 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:1193: checking how to run the C preprocessor" >&5 +echo "configure:1515: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1204,13 +1526,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:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1536: \"$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 : @@ -1221,13 +1543,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:1231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1553: \"$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 : @@ -1238,13 +1560,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:1248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1570: \"$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 : @@ -1266,10 +1588,43 @@ else ac_cv_prog_CPP="$CPP" fi -echo "$ac_t""$CPP" 1>&6 +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:1595: 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:1273: checking if suncc/cc supports -m64" >&5 +echo "configure:1628: 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 @@ -1291,12 +1646,12 @@ fi -echo "$ac_t""$ac_cv_sun_cc64_opt" 1>&6 +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:1300: checking if HP cc supports -Ae" >&5 +echo "configure:1655: 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 @@ -1318,12 +1673,12 @@ fi -echo "$ac_t""$ac_cv_hp_cc_ansi_opt" 1>&6 +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:1327: checking if HP cc supports -O" >&5 +echo "configure:1682: 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 @@ -1345,12 +1700,12 @@ fi -echo "$ac_t""$ac_cv_hp_cc_opt_opt" 1>&6 +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:1354: checking if HP cc supports -G" >&5 +echo "configure:1709: 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 @@ -1372,14 +1727,14 @@ fi -echo "$ac_t""$ac_cv_hp_cc_gprof_opt" 1>&6 +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:1383: checking for $ac_word" >&5 +echo "configure:1738: 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 @@ -1401,13 +1756,13 @@ fi RANLIB="$ac_cv_prog_RANLIB" if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 + eval echo "$ac_t""$RANLIB" 1>&6 else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1411: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1766: 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 @@ -1426,21 +1781,91 @@ rm -f conftestmake fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 SET_MAKE= else - echo "$ac_t""no" 1>&6 + 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:1797: 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:1832: 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" + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1439: checking for ANSI C header files" >&5 +echo "configure:1864: 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 @@ -1448,7 +1873,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1877: \"$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* @@ -1465,7 +1890,7 @@ 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 @@ -1483,7 +1908,7 @@ 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 @@ -1504,7 +1929,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1515,7 +1940,7 @@ exit (0); } EOF -if { (eval echo configure:1519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:1944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null then : else @@ -1530,7 +1955,7 @@ fi fi -echo "$ac_t""$ac_cv_header_stdc" 1>&6 +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 @@ -1558,17 +1983,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1562: checking for $ac_hdr" >&5 +echo "configure:1987: 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:1572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1997: \"$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* @@ -1583,23 +2008,23 @@ 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 echo $ac_n "checking for UNIX-98 compliant inttypes.h""... $ac_c" 1>&6 -echo "configure:1598: checking for UNIX-98 compliant inttypes.h" >&5 +echo "configure:2023: 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() { @@ -1608,7 +2033,7 @@ intptr_t ip; uintptr_t uip; ; return 0; } EOF -if { (eval echo configure:1612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_inttypes=yes else @@ -1620,7 +2045,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_header_inttypes" 1>&6 +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 @@ -1628,12 +2053,12 @@ fi echo $ac_n "checking for SUSv3 compliant stdint.h""... $ac_c" 1>&6 -echo "configure:1632: checking for SUSv3 compliant stdint.h" >&5 +echo "configure:2057: 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() { @@ -1643,7 +2068,7 @@ intmax_t im; uintmax_t uim; ; return 0; } EOF -if { (eval echo configure:1647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_stdint=yes else @@ -1655,7 +2080,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_header_stdint" 1>&6 +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 @@ -1677,12 +2102,12 @@ 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:1681: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2106: 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> @@ -1690,7 +2115,7 @@ DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1702,20 +2127,20 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_dirent_'$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 # 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:1719: checking for opendir in -lc" >&5 +echo "configure:2144: 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 @@ -1723,7 +2148,7 @@ 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 +if { (eval echo configure:2163: \"$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 @@ -1748,12 +2173,12 @@ 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 : else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1757: checking for opendir in -ldir" >&5 +echo "configure:2182: 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 @@ -1761,7 +2186,7 @@ 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 +if { (eval echo configure:2201: \"$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 @@ -1786,17 +2211,17 @@ 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 LIBS="$LIBS -ldir" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 fi fi else echo $ac_n "checking for opendir in -lc""... $ac_c" 1>&6 -echo "configure:1800: checking for opendir in -lc" >&5 +echo "configure:2225: 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 @@ -1804,7 +2229,7 @@ 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 +if { (eval echo configure:2244: \"$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 @@ -1829,12 +2254,12 @@ 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 : else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1838: checking for opendir in -lx" >&5 +echo "configure:2263: 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 @@ -1842,7 +2267,7 @@ 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 +if { (eval echo configure:2282: \"$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 @@ -1867,10 +2292,10 @@ 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 LIBS="$LIBS -lx" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 fi fi @@ -1880,12 +2305,12 @@ lib_dir="$LIBS" LIBS="$ac_xsave_LIBS" echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:1884: checking whether stat file-mode macros are broken" >&5 +echo "configure:2309: 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 @@ -1927,7 +2352,7 @@ fi -echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 +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 @@ -1936,12 +2361,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1940: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2365: 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 @@ -1950,7 +2375,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1962,7 +2387,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_header_time" 1>&6 +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 @@ -1971,12 +2396,12 @@ fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1975: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2400: 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 @@ -1992,7 +2417,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2004,7 +2429,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +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 @@ -2013,12 +2438,12 @@ fi echo $ac_n "checking if select needs nonstd include files""... $ac_c" 1>&6 -echo "configure:2017: checking if select needs nonstd include files" >&5 +echo "configure:2442: 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 @@ -2026,7 +2451,7 @@ fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0); ; return 0; } EOF -if { (eval echo configure:2030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_slect_nonstd_hdr=no else @@ -2038,7 +2463,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_header_slect_nonstd_hdr" 1>&6 +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 @@ -2046,12 +2471,12 @@ fi echo $ac_n "checking if sys/select.h is needed for select""... $ac_c" 1>&6 -echo "configure:2050: checking if sys/select.h is needed for select" >&5 +echo "configure:2475: 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 @@ -2063,7 +2488,7 @@ fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0); ; return 0; } EOF -if { (eval echo configure:2067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_need_sys_select_h=yes else @@ -2075,7 +2500,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_header_need_sys_select_h" 1>&6 +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 @@ -2083,12 +2508,12 @@ fi echo $ac_n "checking if sys/socket.h is needed for select""... $ac_c" 1>&6 -echo "configure:2087: checking if sys/socket.h is needed for select" >&5 +echo "configure:2512: 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 @@ -2100,7 +2525,7 @@ fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0); ; return 0; } EOF -if { (eval echo configure:2104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_need_sys_socket_h=yes else @@ -2112,7 +2537,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_header_need_sys_socket_h" 1>&6 +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 @@ -2123,17 +2548,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2127: checking for $ac_hdr" >&5 +echo "configure:2552: 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:2137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2562: \"$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* @@ -2148,32 +2573,32 @@ 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 stdio.h varargs.h stdarg.h stdlib.h stddef.h string.h strings.h unistd.h fcntl.h sys/file.h +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:2167: checking for $ac_hdr" >&5 +echo "configure:2592: 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:2177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2602: \"$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* @@ -2188,32 +2613,32 @@ 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 getopt.h +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:2207: checking for $ac_hdr" >&5 +echo "configure:2632: 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:2217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2642: \"$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* @@ -2228,32 +2653,32 @@ 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 limits.h +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:2247: checking for $ac_hdr" >&5 +echo "configure:2672: 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:2257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2682: \"$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* @@ -2268,32 +2693,32 @@ 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 a.out.h aouthdr.h elf.h +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:2287: checking for $ac_hdr" >&5 +echo "configure:2712: 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:2297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2722: \"$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* @@ -2308,32 +2733,32 @@ 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 sysexits.h +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:2327: checking for $ac_hdr" >&5 +echo "configure:2752: 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:2337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2762: \"$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* @@ -2348,32 +2773,32 @@ 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 malloc.h sgtty.h termios.h termio.h +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:2367: checking for $ac_hdr" >&5 +echo "configure:2792: 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:2377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2802: \"$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* @@ -2388,32 +2813,32 @@ 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 pwd.h grp.h sys/acl.h acllib.h acl/libacl.h +for ac_hdr in 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:2407: checking for $ac_hdr" >&5 +echo "configure:2832: 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:2417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2842: \"$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* @@ -2428,32 +2853,32 @@ 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 signal.h siginfo.h sys/siginfo.h ucontext.h +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:2447: checking for $ac_hdr" >&5 +echo "configure:2872: 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:2457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2882: \"$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* @@ -2468,32 +2893,32 @@ 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 shadow.h syslog.h +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:2487: checking for $ac_hdr" >&5 +echo "configure:2912: 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:2497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2922: \"$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* @@ -2508,32 +2933,32 @@ 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/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 +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:2527: checking for $ac_hdr" >&5 +echo "configure:2952: 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:2537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2962: \"$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* @@ -2548,32 +2973,32 @@ 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/syscall.h +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:2567: checking for $ac_hdr" >&5 +echo "configure:2992: 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:2577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3002: \"$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* @@ -2588,32 +3013,32 @@ 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 mach/machine.h +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:2607: checking for $ac_hdr" >&5 +echo "configure:3032: 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:2617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3042: \"$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* @@ -2628,32 +3053,32 @@ 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 mntent.h sys/mntent.h sys/mnttab.h sys/mount.h +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:2647: checking for $ac_hdr" >&5 +echo "configure:3072: 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:2657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3082: \"$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* @@ -2668,32 +3093,32 @@ 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/fork.h vfork.h wait.h sys/wait.h sys/resource.h procfs.h sys/procfs.h +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:2687: checking for $ac_hdr" >&5 +echo "configure:3112: 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:2697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3122: \"$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* @@ -2708,32 +3133,32 @@ 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/utsname.h sys/priocntl.h sys/rtpriocntl.h sys/procset.h +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:2727: checking for $ac_hdr" >&5 +echo "configure:3152: 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:2737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3162: \"$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* @@ -2748,32 +3173,32 @@ 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/mtio.h sys/tape.h sys/mman.h linux/pg.h camlib.h +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:2767: checking for $ac_hdr" >&5 +echo "configure:3192: 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:2777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3202: \"$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* @@ -2788,32 +3213,32 @@ 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/shm.h sys/sem.h sys/ipc.h +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:2807: checking for $ac_hdr" >&5 +echo "configure:3232: 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:2817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3242: \"$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* @@ -2828,32 +3253,32 @@ 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/dkio.h sys/dklabel.h sun/dkio.h sun/dklabel.h +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:2847: checking for $ac_hdr" >&5 +echo "configure:3272: 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:2857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3282: \"$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* @@ -2868,32 +3293,32 @@ 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/types.h sys/stat.h types.h stat.h +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:2887: checking for $ac_hdr" >&5 +echo "configure:3312: 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:2897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3322: \"$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* @@ -2908,32 +3333,32 @@ 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/stypes.h sys/filedesc.h +for ac_hdr in sys/shm.h sys/sem.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:2927: checking for $ac_hdr" >&5 +echo "configure:3352: 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:2937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3362: \"$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* @@ -2948,32 +3373,32 @@ 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/acct.h +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:2967: checking for $ac_hdr" >&5 +echo "configure:3392: 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:2977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3402: \"$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* @@ -2988,32 +3413,32 @@ 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 poll.h sys/poll.h sys/select.h +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:3007: checking for $ac_hdr" >&5 +echo "configure:3432: 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:3017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3442: \"$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* @@ -3028,32 +3453,32 @@ 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 netdb.h sys/socket.h netinet/in.h stropts.h +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:3047: checking for $ac_hdr" >&5 +echo "configure:3472: 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:3057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3482: \"$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* @@ -3068,32 +3493,32 @@ 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 ieeefp.h fp.h +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:3087: checking for $ac_hdr" >&5 +echo "configure:3512: 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:3097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3522: \"$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* @@ -3108,32 +3533,32 @@ 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 values.h float.h math.h +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:3127: checking for $ac_hdr" >&5 +echo "configure:3552: 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:3137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3562: \"$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* @@ -3148,14 +3573,134 @@ 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 netdb.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:3592: 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:3602: \"$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:3632: 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:3642: \"$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:3672: 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:3682: \"$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 @@ -3163,17 +3708,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3167: checking for $ac_hdr" >&5 +echo "configure:3712: 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:3177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3722: \"$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* @@ -3188,14 +3733,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 @@ -3203,17 +3748,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3207: checking for $ac_hdr" >&5 +echo "configure:3752: 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:3217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3762: \"$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* @@ -3228,14 +3773,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 @@ -3243,17 +3788,57 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3247: checking for $ac_hdr" >&5 +echo "configure:3792: 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:3802: \"$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:3832: 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:3257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3842: \"$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* @@ -3268,14 +3853,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 @@ -3283,17 +3868,57 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3287: checking for $ac_hdr" >&5 +echo "configure:3872: 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:3882: \"$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:3912: 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:3297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3922: \"$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* @@ -3308,14 +3933,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 @@ -3323,17 +3948,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3327: checking for $ac_hdr" >&5 +echo "configure:3952: 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:3337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3962: \"$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* @@ -3348,14 +3973,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 @@ -3363,17 +3988,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3367: checking for $ac_hdr" >&5 +echo "configure:3992: 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:3377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4002: \"$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* @@ -3388,14 +4013,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 @@ -3403,17 +4028,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3407: checking for $ac_hdr" >&5 +echo "configure:4032: 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:3417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4042: \"$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* @@ -3428,14 +4053,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 @@ -3443,17 +4068,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3447: checking for $ac_hdr" >&5 +echo "configure:4072: 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:3457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4082: \"$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* @@ -3468,14 +4093,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 @@ -3483,17 +4108,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3487: checking for $ac_hdr" >&5 +echo "configure:4112: 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:3497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4122: \"$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* @@ -3508,14 +4133,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 @@ -3523,17 +4148,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3527: checking for $ac_hdr" >&5 +echo "configure:4152: 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:3537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4162: \"$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* @@ -3548,14 +4173,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 @@ -3563,17 +4188,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3567: checking for $ac_hdr" >&5 +echo "configure:4192: 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:3577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4202: \"$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* @@ -3588,14 +4213,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 @@ -3603,17 +4228,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3607: checking for $ac_hdr" >&5 +echo "configure:4232: 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:3617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4242: \"$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* @@ -3628,14 +4253,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 @@ -3643,17 +4268,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3647: checking for $ac_hdr" >&5 +echo "configure:4272: 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:3657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4282: \"$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* @@ -3668,14 +4293,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 @@ -3683,17 +4308,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3687: checking for $ac_hdr" >&5 +echo "configure:4312: 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:3697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4322: \"$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* @@ -3708,14 +4333,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 @@ -3723,17 +4348,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3727: checking for $ac_hdr" >&5 +echo "configure:4352: 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:3737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4362: \"$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* @@ -3748,14 +4373,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 @@ -3763,17 +4388,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3767: checking for $ac_hdr" >&5 +echo "configure:4392: 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:3777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4402: \"$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* @@ -3788,14 +4413,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 @@ -3803,17 +4428,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3807: checking for $ac_hdr" >&5 +echo "configure:4432: 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:3817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4442: \"$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* @@ -3828,14 +4453,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 @@ -3843,17 +4468,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3847: checking for $ac_hdr" >&5 +echo "configure:4472: 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:3857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4482: \"$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* @@ -3868,14 +4493,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 @@ -3883,17 +4508,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3887: checking for $ac_hdr" >&5 +echo "configure:4512: 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:3897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4522: \"$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* @@ -3908,14 +4533,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 @@ -3923,17 +4548,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3927: checking for $ac_hdr" >&5 +echo "configure:4552: 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:3937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4562: \"$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* @@ -3948,14 +4573,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 @@ -3963,17 +4588,57 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3967: checking for $ac_hdr" >&5 +echo "configure:4592: 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:4602: \"$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:4632: 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:3977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4642: \"$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* @@ -3988,26 +4653,26 @@ 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 echo $ac_n "checking for header file containing major(), minor() and makedev()""... $ac_c" 1>&6 -echo "configure:4005: checking for header file containing major(), minor() and makedev()" >&5 +echo "configure:4670: 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 @@ -4015,7 +4680,7 @@ int i = major(0); i = minor(0); i = makedev(0,0); ; return 0; } EOF -if { (eval echo configure:4019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_makedev=sys/mkdev.h else @@ -4025,7 +4690,7 @@ rm -f conftest* if test $ac_cv_header_makedev = none; then cat > conftest.$ac_ext < #include @@ -4033,7 +4698,7 @@ int i = major(0); i = minor(0); i = makedev(0,0); ; return 0; } EOF -if { (eval echo configure:4037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_makedev=sys/sysmacros.h else @@ -4044,7 +4709,7 @@ fi fi -echo "$ac_t""$ac_cv_header_makedev" 1>&6 +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 @@ -4060,7 +4725,7 @@ echo $ac_n "checking bits in minor device number""... $ac_c" 1>&6 -echo "configure:4064: checking bits in minor device number" >&5 +echo "configure:4729: 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 @@ -4068,7 +4733,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < #include @@ -4125,7 +4790,7 @@ exit(0); } EOF -if { (eval echo configure:4129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:4794: \"$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 @@ -4138,14 +4803,14 @@ fi fi -echo "$ac_t""$ac_cv_dev_minor_bits" 1>&6 +eval echo "$ac_t""$ac_cv_dev_minor_bits" 1>&6 cat >> confdefs.h <&6 -echo "configure:4149: checking whether bits in minor device numbers are non contiguous" >&5 +echo "configure:4814: 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 @@ -4153,7 +4818,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -4205,7 +4870,7 @@ } exit (m == c);} EOF -if { (eval echo configure:4209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:4874: \"$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 @@ -4219,7 +4884,7 @@ fi -echo "$ac_t""$ac_cv_dev_minor_noncontig" 1>&6 +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 @@ -4228,12 +4893,12 @@ fi echo $ac_n "checking for _filbuf()""... $ac_c" 1>&6 -echo "configure:4232: checking for _filbuf()" >&5 +echo "configure:4897: 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() { @@ -4253,7 +4918,7 @@ fclose(f); ; return 0; } EOF -if { (eval echo configure:4257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func__filbuf=yes else @@ -4265,7 +4930,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_func__filbuf" 1>&6 +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 @@ -4273,12 +4938,12 @@ fi echo $ac_n "checking for __filbuf()""... $ac_c" 1>&6 -echo "configure:4277: checking for __filbuf()" >&5 +echo "configure:4942: 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() { @@ -4298,7 +4963,7 @@ fclose(f); ; return 0; } EOF -if { (eval echo configure:4302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func___filbuf=yes else @@ -4310,7 +4975,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_func___filbuf" 1>&6 +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 @@ -4318,12 +4983,12 @@ fi echo $ac_n "checking for USG derived STDIO""... $ac_c" 1>&6 -echo "configure:4322: checking for USG derived STDIO" >&5 +echo "configure:4987: 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() { @@ -4352,7 +5017,7 @@ fclose(f); ; return 0; } EOF -if { (eval echo configure:4356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5021: \"$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 @@ -4364,7 +5029,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_header_usg_stdio" 1>&6 +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 @@ -4372,19 +5037,19 @@ fi echo $ac_n "checking for errno definition in errno.h""... $ac_c" 1>&6 -echo "configure:4376: checking for errno definition in errno.h" >&5 +echo "configure:5041: 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:4388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_errno_def=yes else @@ -4396,7 +5061,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_header_errno_def" 1>&6 +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 @@ -4404,12 +5069,12 @@ fi echo $ac_n "checking for environ definition in unistd.h/stdlib.h""... $ac_c" 1>&6 -echo "configure:4408: checking for environ definition in unistd.h/stdlib.h" >&5 +echo "configure:5073: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_environ_def=yes else @@ -4436,7 +5101,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_header_environ_def" 1>&6 +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 @@ -4444,19 +5109,19 @@ fi echo $ac_n "checking for sys_siglist definition in signal.h""... $ac_c" 1>&6 -echo "configure:4448: checking for sys_siglist definition in signal.h" >&5 +echo "configure:5113: 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]; +char *cp = (char *)sys_siglist[0]; exit (cp != (char *)0 && *cp != 0); ; return 0; } EOF -if { (eval echo configure:4460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_siglist_def=yes else @@ -4468,7 +5133,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_header_sys_siglist_def" 1>&6 +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 @@ -4477,12 +5142,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4481: checking for working const" >&5 +echo "configure:5146: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4543,7 +5208,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_c_const" 1>&6 +eval echo "$ac_t""$ac_cv_c_const" 1>&6 if test $ac_cv_c_const = no; then cat >> confdefs.h <<\EOF #define const @@ -4552,14 +5217,14 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4556: checking whether byte ordering is bigendian" >&5 +echo "configure:5221: 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 @@ -4570,11 +5235,11 @@ #endif ; return 0; } EOF -if { (eval echo configure:4574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5239: \"$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 @@ -4585,7 +5250,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:4589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4605,7 +5270,7 @@ { 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 +if { (eval echo configure:5287: \"$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_bigendian=no else @@ -4633,7 +5298,7 @@ fi fi -echo "$ac_t""$ac_cv_c_bigendian" 1>&6 +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 @@ -4642,7 +5307,7 @@ fi echo $ac_n "checking whether bitorder in bitfields is htol""... $ac_c" 1>&6 -echo "configure:4646: checking whether bitorder in bitfields is htol" >&5 +echo "configure:5311: 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 @@ -4650,7 +5315,7 @@ { 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 +if { (eval echo configure:5335: \"$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_bitfields_htol=yes else @@ -4680,7 +5345,7 @@ fi -echo "$ac_t""$ac_cv_c_bitfields_htol" 1>&6 +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 @@ -4690,12 +5355,12 @@ echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6 -echo "configure:4694: checking for preprocessor stringizing operator" >&5 +echo "configure:5359: 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 <&6 +eval echo "$ac_t""${ac_cv_c_stringize}" 1>&6 echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:4729: checking for inline" >&5 +echo "configure:5394: 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 +if { (eval echo configure:5408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -4751,7 +5416,7 @@ fi -echo "$ac_t""$ac_cv_c_inline" 1>&6 +eval echo "$ac_t""$ac_cv_c_inline" 1>&6 case "$ac_cv_c_inline" in inline | yes) cat >> confdefs.h <<\EOF @@ -4776,12 +5441,12 @@ esac echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:4780: checking return type of signal handlers" >&5 +echo "configure:5445: 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 @@ -4798,7 +5463,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:4802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -4810,19 +5475,19 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_signal" 1>&6 +eval echo "$ac_t""$ac_cv_type_signal" 1>&6 cat >> confdefs.h <&6 -echo "configure:4821: checking for uid_t in sys/types.h" >&5 +echo "configure:5486: 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 @@ -4838,7 +5503,7 @@ fi -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +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 @@ -4851,7 +5516,7 @@ fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:4855: checking type of array argument to getgroups" >&5 +echo "configure:5520: 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 @@ -4859,7 +5524,7 @@ ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:5553: \"$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 @@ -4898,7 +5563,7 @@ if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF @@ -4915,26 +5580,26 @@ fi fi -echo "$ac_t""$ac_cv_type_getgroups" 1>&6 +eval echo "$ac_t""$ac_cv_type_getgroups" 1>&6 cat >> confdefs.h <&6 -echo "configure:4926: checking for type long long" >&5 +echo "configure:5591: 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 +if { (eval echo configure:5603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_longlong=yes else @@ -4946,7 +5611,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_longlong" 1>&6 +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 @@ -4954,19 +5619,19 @@ fi echo $ac_n "checking for type __int64""... $ac_c" 1>&6 -echo "configure:4958: checking for type __int64" >&5 +echo "configure:5623: 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 +if { (eval echo configure:5635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type___int64=yes else @@ -4978,7 +5643,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type___int64" 1>&6 +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 @@ -4986,19 +5651,19 @@ fi echo $ac_n "checking for type long double""... $ac_c" 1>&6 -echo "configure:4990: checking for type long double" >&5 +echo "configure:5655: 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 +if { (eval echo configure:5667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_longdouble=yes else @@ -5010,7 +5675,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_longdouble" 1>&6 +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 @@ -5018,7 +5683,7 @@ fi echo $ac_n "checking for prototypes""... $ac_c" 1>&6 -echo "configure:5022: checking for prototypes" >&5 +echo "configure:5687: checking for prototypes" >&5 if eval "test \"`echo '$''{'ac_cv_type_prototypes'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5026,7 +5691,7 @@ { 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 +if { (eval echo configure:5705: \"$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_prototypes=yes else @@ -5050,7 +5715,7 @@ fi -echo "$ac_t""$ac_cv_type_prototypes" 1>&6 +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 @@ -5058,19 +5723,19 @@ fi echo $ac_n "checking if compiler allows dynamic arrays""... $ac_c" 1>&6 -echo "configure:5062: checking if compiler allows dynamic arrays" >&5 +echo "configure:5727: 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 +if { (eval echo configure:5739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dyn_arrays=yes else @@ -5082,7 +5747,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_dyn_arrays" 1>&6 +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 @@ -5090,20 +5755,21 @@ fi echo $ac_n "checking if compiler allows pragma weak""... $ac_c" 1>&6 -echo "configure:5094: checking if compiler allows pragma weak" >&5 +echo "configure:5759: 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 +if { (eval echo configure:5773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_pragma_weak=yes else @@ -5115,7 +5781,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_pragma_weak" 1>&6 +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 @@ -5124,12 +5790,12 @@ fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5128: checking for uid_t in sys/types.h" >&5 +echo "configure:5794: 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 @@ -5145,7 +5811,7 @@ fi -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +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 @@ -5158,12 +5824,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5162: checking for size_t" >&5 +echo "configure:5828: 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 @@ -5184,7 +5850,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 +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 @@ -5193,12 +5859,12 @@ fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:5197: checking for ssize_t" >&5 +echo "configure:5863: 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 @@ -5219,7 +5885,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 +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 @@ -5228,12 +5894,12 @@ fi echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6 -echo "configure:5232: checking for ptrdiff_t" >&5 +echo "configure:5898: 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 @@ -5254,7 +5920,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_ptrdiff_t" 1>&6 +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 @@ -5263,12 +5929,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5267: checking for pid_t" >&5 +echo "configure:5933: 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 @@ -5289,7 +5955,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 +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 @@ -5298,12 +5964,12 @@ fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5302: checking for off_t" >&5 +echo "configure:5968: 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 @@ -5324,7 +5990,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_off_t" 1>&6 +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 @@ -5333,12 +5999,12 @@ fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5337: checking for mode_t" >&5 +echo "configure:6003: 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 @@ -5359,7 +6025,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_mode_t" 1>&6 +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 @@ -5368,12 +6034,12 @@ fi echo $ac_n "checking for time_t""... $ac_c" 1>&6 -echo "configure:5372: checking for time_t" >&5 +echo "configure:6038: 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 < @@ -5391,7 +6057,7 @@ time_t t; ; return 0; } EOF -if { (eval echo configure:5395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_time_t=yes else @@ -5403,7 +6069,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_time_t" 1>&6 +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 @@ -5411,12 +6077,12 @@ fi echo $ac_n "checking for caddr_t""... $ac_c" 1>&6 -echo "configure:5415: checking for caddr_t" >&5 +echo "configure:6081: 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 @@ -5437,7 +6103,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_caddr_t" 1>&6 +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 * @@ -5446,12 +6112,12 @@ fi echo $ac_n "checking for daddr_t""... $ac_c" 1>&6 -echo "configure:5450: checking for daddr_t" >&5 +echo "configure:6116: 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 @@ -5472,7 +6138,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_daddr_t" 1>&6 +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 @@ -5481,12 +6147,12 @@ fi echo $ac_n "checking for dev_t""... $ac_c" 1>&6 -echo "configure:5485: checking for dev_t" >&5 +echo "configure:6151: 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 @@ -5507,7 +6173,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_dev_t" 1>&6 +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 @@ -5516,12 +6182,12 @@ fi echo $ac_n "checking for major_t""... $ac_c" 1>&6 -echo "configure:5520: checking for major_t" >&5 +echo "configure:6186: 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 @@ -5542,7 +6208,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_major_t" 1>&6 +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 @@ -5551,12 +6217,12 @@ fi echo $ac_n "checking for minor_t""... $ac_c" 1>&6 -echo "configure:5555: checking for minor_t" >&5 +echo "configure:6221: 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 @@ -5577,7 +6243,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_minor_t" 1>&6 +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 @@ -5586,12 +6252,12 @@ fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:5590: checking for ino_t" >&5 +echo "configure:6256: 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 @@ -5612,7 +6278,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_ino_t" 1>&6 +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 @@ -5621,12 +6287,12 @@ fi echo $ac_n "checking for nlink_t""... $ac_c" 1>&6 -echo "configure:5625: checking for nlink_t" >&5 +echo "configure:6291: 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 @@ -5647,7 +6313,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_nlink_t" 1>&6 +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 @@ -5656,12 +6322,12 @@ fi echo $ac_n "checking for blksize_t""... $ac_c" 1>&6 -echo "configure:5660: checking for blksize_t" >&5 +echo "configure:6326: 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 @@ -5682,7 +6348,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_blksize_t" 1>&6 +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 @@ -5691,12 +6357,12 @@ fi echo $ac_n "checking for blkcnt_t""... $ac_c" 1>&6 -echo "configure:5695: checking for blkcnt_t" >&5 +echo "configure:6361: 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 @@ -5717,7 +6383,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_blkcnt_t" 1>&6 +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 @@ -5726,12 +6392,12 @@ fi echo $ac_n "checking for clock_t""... $ac_c" 1>&6 -echo "configure:5730: checking for clock_t" >&5 +echo "configure:6396: 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 < @@ -5769,7 +6435,7 @@ clock_t t; ; return 0; } EOF -if { (eval echo configure:5773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_clock_t=yes else @@ -5781,7 +6447,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_clock_t" 1>&6 +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 @@ -5789,12 +6455,12 @@ fi echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:5793: checking for socklen_t" >&5 +echo "configure:6459: 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 @@ -5816,7 +6482,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 +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 @@ -5824,12 +6490,12 @@ fi echo $ac_n "checking for greg_t""... $ac_c" 1>&6 -echo "configure:5828: checking for greg_t" >&5 +echo "configure:6494: 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 @@ -5843,15 +6509,15 @@ 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 + eval ac_cv_have_type_greg_t=yes else rm -rf conftest* - ac_cv_have_type_greg_t=no + eval ac_cv_have_type_greg_t=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_have_type_greg_t" 1>&6 +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:5865: checking if stack_t is declared in signal.h" >&5 +echo "configure:6531: 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; +stack_t ss; ss.ss_size = 0; exit (ss.ss_size == 0); ; return 0; } EOF -if { (eval echo configure:5877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_stack_t=yes else @@ -5885,7 +6551,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_stack_t" 1>&6 +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 @@ -5893,12 +6559,12 @@ fi echo $ac_n "checking if siginfo_t is declared in signal.h""... $ac_c" 1>&6 -echo "configure:5897: checking if siginfo_t is declared in signal.h" >&5 +echo "configure:6563: 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 @@ -5909,10 +6575,10 @@ #endif #endif int main() { -siginfo_t si; si.si_signo = 0; +siginfo_t si; si.si_signo = 0; exit (si.si_signo == 0); ; return 0; } EOF -if { (eval echo configure:5916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_siginfo_t=yes else @@ -5924,7 +6590,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_siginfo_t" 1>&6 +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 @@ -5933,12 +6599,12 @@ fi echo $ac_n "checking for u_char""... $ac_c" 1>&6 -echo "configure:5937: checking for u_char" >&5 +echo "configure:6603: 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 @@ -5959,7 +6625,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_u_char" 1>&6 +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 @@ -5968,12 +6634,12 @@ fi echo $ac_n "checking for u_short""... $ac_c" 1>&6 -echo "configure:5972: checking for u_short" >&5 +echo "configure:6638: 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 @@ -5994,7 +6660,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_u_short" 1>&6 +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 @@ -6003,12 +6669,12 @@ fi echo $ac_n "checking for u_int""... $ac_c" 1>&6 -echo "configure:6007: checking for u_int" >&5 +echo "configure:6673: 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 @@ -6029,7 +6695,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_u_int" 1>&6 +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 @@ -6038,12 +6704,12 @@ fi echo $ac_n "checking for u_long""... $ac_c" 1>&6 -echo "configure:6042: checking for u_long" >&5 +echo "configure:6708: 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 @@ -6064,7 +6730,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_type_u_long" 1>&6 +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 @@ -6073,13 +6739,13 @@ fi -echo $ac_n "checking for wctype_t""... $ac_c" 1>&6 -echo "configure:6078: checking for wctype_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_wctype_t'+set}'`\" = set"; then +echo $ac_n "checking for int8_t""... $ac_c" 1>&6 +echo "configure:6744: 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 @@ -6088,41 +6754,41 @@ #if HAVE_STDDEF_H || STDC_HEADERS #include #endif -#ifdef HAVE_WCHAR_H -#include +#ifdef HAVE_INTTYPES_H +#include #endif -#ifdef HAVE_WCTYPE_H -#include +#ifdef HAVE_STDINT_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 + egrep "(^|[^a-zA-Z_0-9])int8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_wctype_t=yes + ac_cv_type_int8_t=yes else rm -rf conftest* - ac_cv_type_wctype_t=no + ac_cv_type_int8_t=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_wctype_t" 1>&6 -if test $ac_cv_type_wctype_t = no; then +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 wctype_t int +#define int8_t Int8_t EOF fi -echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6 -echo "configure:6121: checking for mbstate_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_mbstate_t'+set}'`\" = set"; then +echo $ac_n "checking for int16_t""... $ac_c" 1>&6 +echo "configure:6787: 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 @@ -6131,405 +6797,560 @@ #if HAVE_STDDEF_H || STDC_HEADERS #include #endif -#ifdef HAVE_WCHAR_H -#include +#ifdef HAVE_INTTYPES_H +#include #endif -#ifdef HAVE_WCTYPE_H -#include +#ifdef HAVE_STDINT_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 + egrep "(^|[^a-zA-Z_0-9])int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_mbstate_t=yes + ac_cv_type_int16_t=yes else rm -rf conftest* - ac_cv_type_mbstate_t=no + ac_cv_type_int16_t=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_mbstate_t" 1>&6 -if test $ac_cv_type_mbstate_t = no; then +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 mbstate_t wctype_t +#define int16_t Int16_t EOF fi -echo $ac_n "checking size of char""... $ac_c" 1>&6 -echo "configure:6164: checking size of char" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then +echo $ac_n "checking for int32_t""... $ac_c" 1>&6 +echo "configure:6830: 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 - 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 +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif #if HAVE_STDDEF_H || STDC_HEADERS -#include /* For ptrdiff_t, wchar_t, size_t */ +#include #endif -#ifdef HAVE_SYS_TYPES_H -#include +#ifdef HAVE_INTTYPES_H +#include #endif -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(char)); - exit(0); -} +#ifdef HAVE_STDINT_H +#include +#endif + EOF -if { (eval echo configure:6189: \"$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` +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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_char=0 -fi -rm -fr conftest* + rm -rf conftest* + ac_cv_type_int32_t=no fi +rm -f conftest* fi -echo "$ac_t""$ac_cv_sizeof_char" 1>&6 -cat >> confdefs.h <&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 size of short int""... $ac_c" 1>&6 -echo "configure:6209: checking size of short int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then + +echo $ac_n "checking for int64_t""... $ac_c" 1>&6 +echo "configure:6873: 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 - 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 +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif #if HAVE_STDDEF_H || STDC_HEADERS -#include /* For ptrdiff_t, wchar_t, size_t */ +#include #endif -#ifdef HAVE_SYS_TYPES_H -#include +#ifdef HAVE_INTTYPES_H +#include #endif -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(short int)); - exit(0); -} +#ifdef HAVE_STDINT_H +#include +#endif + EOF -if { (eval echo configure:6234: \"$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` +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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_short_int=0 -fi -rm -fr conftest* + rm -rf conftest* + ac_cv_type_int64_t=no fi +rm -f conftest* fi -echo "$ac_t""$ac_cv_sizeof_short_int" 1>&6 -cat >> confdefs.h <&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 size of int""... $ac_c" 1>&6 -echo "configure:6254: checking size of int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then +echo $ac_n "checking for intmax_t""... $ac_c" 1>&6 +echo "configure:6916: 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 - 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 +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif #if HAVE_STDDEF_H || STDC_HEADERS -#include /* For ptrdiff_t, wchar_t, size_t */ +#include #endif -#ifdef HAVE_SYS_TYPES_H -#include +#ifdef HAVE_INTTYPES_H +#include #endif -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); -} +#ifdef HAVE_STDINT_H +#include +#endif + EOF -if { (eval echo configure:6279: \"$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` +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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int=0 -fi -rm -fr conftest* + rm -rf conftest* + ac_cv_type_intmax_t=no fi +rm -f conftest* fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 -cat >> confdefs.h <&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 size of long int""... $ac_c" 1>&6 -echo "configure:6299: checking size of long int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then + +echo $ac_n "checking for intptr_t""... $ac_c" 1>&6 +echo "configure:6959: 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 - 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 +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif #if HAVE_STDDEF_H || STDC_HEADERS -#include /* For ptrdiff_t, wchar_t, size_t */ +#include #endif -#ifdef HAVE_SYS_TYPES_H -#include +#ifdef HAVE_INTTYPES_H +#include #endif -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long int)); - exit(0); -} +#ifdef HAVE_STDINT_H +#include +#endif + EOF -if { (eval echo configure:6324: \"$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` +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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long_int=0 -fi -rm -fr conftest* + rm -rf conftest* + ac_cv_type_intptr_t=no fi +rm -f conftest* fi -echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6 -cat >> confdefs.h <&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 size of long long""... $ac_c" 1>&6 -echo "configure:6344: checking size of long long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then +echo $ac_n "checking for uint8_t""... $ac_c" 1>&6 +echo "configure:7002: 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 - 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 +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif #if HAVE_STDDEF_H || STDC_HEADERS -#include /* For ptrdiff_t, wchar_t, size_t */ +#include #endif -#ifdef HAVE_SYS_TYPES_H -#include +#ifdef HAVE_INTTYPES_H +#include #endif -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long long)); - exit(0); -} +#ifdef HAVE_STDINT_H +#include +#endif + EOF -if { (eval echo configure:6369: \"$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` +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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long_long=0 -fi -rm -fr conftest* + rm -rf conftest* + ac_cv_type_uint8_t=no fi +rm -f conftest* fi -echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 -cat >> confdefs.h <&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 size of __int64""... $ac_c" 1>&6 -echo "configure:6389: checking size of __int64" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then + +echo $ac_n "checking for uint16_t""... $ac_c" 1>&6 +echo "configure:7045: 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 - 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 +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif #if HAVE_STDDEF_H || STDC_HEADERS -#include /* For ptrdiff_t, wchar_t, size_t */ +#include #endif -#ifdef HAVE_SYS_TYPES_H -#include +#ifdef HAVE_INTTYPES_H +#include #endif -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(__int64)); - exit(0); -} +#ifdef HAVE_STDINT_H +#include +#endif + EOF -if { (eval echo configure:6414: \"$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` +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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof___int64=0 -fi -rm -fr conftest* + rm -rf conftest* + ac_cv_type_uint16_t=no fi +rm -f conftest* fi -echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 -cat >> confdefs.h <&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 size of char *""... $ac_c" 1>&6 -echo "configure:6434: checking size of char *" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then +echo $ac_n "checking for uint32_t""... $ac_c" 1>&6 +echo "configure:7088: 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 - 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 +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif #if HAVE_STDDEF_H || STDC_HEADERS -#include /* For ptrdiff_t, wchar_t, size_t */ +#include #endif -#ifdef HAVE_SYS_TYPES_H -#include +#ifdef HAVE_INTTYPES_H +#include #endif -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(char *)); - exit(0); -} +#ifdef HAVE_STDINT_H +#include +#endif + EOF -if { (eval echo configure:6459: \"$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` +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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_char_p=0 + rm -rf conftest* + ac_cv_type_uint32_t=no fi -rm -fr conftest* +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_t""$ac_cv_sizeof_char_p" 1>&6 -cat >> confdefs.h <&6 +echo "configure:7131: 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 size of unsigned char""... $ac_c" 1>&6 -echo "configure:6480: checking size of unsigned char" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then +echo $ac_n "checking for uintmax_t""... $ac_c" 1>&6 +echo "configure:7174: 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 - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + 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:7217: 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 < +#include +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif #if HAVE_STDDEF_H || STDC_HEADERS -#include /* For ptrdiff_t, wchar_t, size_t */ +#include #endif -#ifdef HAVE_SYS_TYPES_H +#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:7260: 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 -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(unsigned char)); - exit(0); -} +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif + EOF -if { (eval echo configure:6505: \"$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` +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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_unsigned_char=0 + rm -rf conftest* + ac_cv_type_wctype_t=no fi -rm -fr conftest* +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_t""$ac_cv_sizeof_unsigned_char" 1>&6 -cat >> confdefs.h <&6 +echo "configure:7303: 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 size of unsigned short int""... $ac_c" 1>&6 -echo "configure:6525: checking size of unsigned short int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short_int'+set}'`\" = set"; then +echo $ac_n "checking size of char""... $ac_c" 1>&6 +echo "configure:7346: 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 @@ -6542,39 +7363,39 @@ { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - fprintf(f, "%d\n", sizeof(unsigned short int)); + fprintf(f, "%d\n", sizeof(char)); exit(0); } EOF -if { (eval echo configure:6550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:7371: \"$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` + ac_cv_sizeof_char=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ac_cv_sizeof_unsigned_short_int=0 + ac_cv_sizeof_char=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_unsigned_short_int" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof_char" 1>&6 cat >> confdefs.h <&6 -echo "configure:6570: checking size of unsigned int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then +echo $ac_n "checking size of short int""... $ac_c" 1>&6 +echo "configure:7391: 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 @@ -6587,39 +7408,39 @@ { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - fprintf(f, "%d\n", sizeof(unsigned int)); + fprintf(f, "%d\n", sizeof(short int)); exit(0); } EOF -if { (eval echo configure:6595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:7416: \"$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` + 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_unsigned_int=0 + ac_cv_sizeof_short_int=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof_short_int" 1>&6 cat >> confdefs.h <&6 -echo "configure:6615: checking size of unsigned long int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_int'+set}'`\" = set"; then +echo $ac_n "checking size of int""... $ac_c" 1>&6 +echo "configure:7436: 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 @@ -6632,39 +7453,39 @@ { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - fprintf(f, "%d\n", sizeof(unsigned long int)); + fprintf(f, "%d\n", sizeof(int)); exit(0); } EOF -if { (eval echo configure:6640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:7461: \"$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` + ac_cv_sizeof_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 + ac_cv_sizeof_int=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_unsigned_long_int" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof_int" 1>&6 cat >> confdefs.h <&6 -echo "configure:6660: checking size of unsigned long long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then +echo $ac_n "checking size of long int""... $ac_c" 1>&6 +echo "configure:7481: 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 @@ -6677,39 +7498,39 @@ { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - fprintf(f, "%d\n", sizeof(unsigned long long)); + fprintf(f, "%d\n", sizeof(long int)); exit(0); } EOF -if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:7506: \"$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` + 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_unsigned_long_long=0 + ac_cv_sizeof_long_int=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6 cat >> confdefs.h <&6 -echo "configure:6705: checking size of unsigned __int64" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned___int64'+set}'`\" = set"; then +echo $ac_n "checking size of long long""... $ac_c" 1>&6 +echo "configure:7526: 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 @@ -6722,39 +7543,39 @@ { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - fprintf(f, "%d\n", sizeof(unsigned __int64)); + fprintf(f, "%d\n", sizeof(long long)); exit(0); } EOF -if { (eval echo configure:6730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:7551: \"$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` + 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_unsigned___int64=0 + ac_cv_sizeof_long_long=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_unsigned___int64" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 cat >> confdefs.h <&6 -echo "configure:6750: checking size of unsigned char *" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char_p'+set}'`\" = set"; then +echo $ac_n "checking size of __int64""... $ac_c" 1>&6 +echo "configure:7571: 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 @@ -6767,39 +7588,39 @@ { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - fprintf(f, "%d\n", sizeof(unsigned char *)); + fprintf(f, "%d\n", sizeof(__int64)); exit(0); } EOF -if { (eval echo configure:6775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:7596: \"$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` + ac_cv_sizeof___int64=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ac_cv_sizeof_unsigned_char_p=0 + ac_cv_sizeof___int64=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_unsigned_char_p" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 cat >> confdefs.h <&6 -echo "configure:6795: checking size of float" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then +echo $ac_n "checking size of char *""... $ac_c" 1>&6 +echo "configure:7616: 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 @@ -6812,39 +7633,40 @@ { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - fprintf(f, "%d\n", sizeof(float)); + fprintf(f, "%d\n", sizeof(char *)); exit(0); } EOF -if { (eval echo configure:6820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:7641: \"$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` + 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_float=0 + ac_cv_sizeof_char_p=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_float" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof_char_p" 1>&6 cat >> confdefs.h <&6 -echo "configure:6840: checking size of double" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then + +echo $ac_n "checking size of unsigned char""... $ac_c" 1>&6 +echo "configure:7662: 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 @@ -6857,39 +7679,39 @@ { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - fprintf(f, "%d\n", sizeof(double)); + fprintf(f, "%d\n", sizeof(unsigned char)); exit(0); } EOF -if { (eval echo configure:6865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:7687: \"$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` + 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_double=0 + ac_cv_sizeof_unsigned_char=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_double" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof_unsigned_char" 1>&6 cat >> confdefs.h <&6 -echo "configure:6885: checking size of long double" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then +echo $ac_n "checking size of unsigned short int""... $ac_c" 1>&6 +echo "configure:7707: 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 @@ -6902,40 +7724,39 @@ { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long double)); + fprintf(f, "%d\n", sizeof(unsigned short int)); exit(0); } EOF -if { (eval echo configure:6910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:7732: \"$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` + 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_long_double=0 + ac_cv_sizeof_unsigned_short_int=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof_unsigned_short_int" 1>&6 cat >> confdefs.h <&6 -echo "configure:6931: checking size of size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then +echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6 +echo "configure:7752: 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 @@ -6948,39 +7769,39 @@ { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - fprintf(f, "%d\n", sizeof(size_t)); + fprintf(f, "%d\n", sizeof(unsigned int)); exit(0); } EOF -if { (eval echo configure:6956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:7777: \"$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` + 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_size_t=0 + ac_cv_sizeof_unsigned_int=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_size_t" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6 cat >> confdefs.h <&6 -echo "configure:6976: checking size of ssize_t" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_ssize_t'+set}'`\" = set"; then +echo $ac_n "checking size of unsigned long int""... $ac_c" 1>&6 +echo "configure:7797: 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 @@ -6993,39 +7814,39 @@ { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - fprintf(f, "%d\n", sizeof(ssize_t)); + fprintf(f, "%d\n", sizeof(unsigned long int)); exit(0); } EOF -if { (eval echo configure:7001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:7822: \"$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` + 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_ssize_t=0 + ac_cv_sizeof_unsigned_long_int=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_ssize_t" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof_unsigned_long_int" 1>&6 cat >> confdefs.h <&6 -echo "configure:7021: checking size of ptrdiff_t" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_ptrdiff_t'+set}'`\" = set"; then +echo $ac_n "checking size of unsigned long long""... $ac_c" 1>&6 +echo "configure:7842: 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 @@ -7038,2527 +7859,5311 @@ { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - fprintf(f, "%d\n", sizeof(ptrdiff_t)); + fprintf(f, "%d\n", sizeof(unsigned long long)); exit(0); } EOF -if { (eval echo configure:7046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:7867: \"$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` + 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_ptrdiff_t=0 + ac_cv_sizeof_unsigned_long_long=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_ptrdiff_t" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6 cat >> confdefs.h <&6 -echo "configure:7067: checking size of time_t" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then +echo $ac_n "checking size of unsigned __int64""... $ac_c" 1>&6 +echo "configure:7887: 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 < -#include -#ifdef TIME_WITH_SYS_TIME_H -# include -# include -#else -#ifdef HAVE_SYS_TIME_H -# include -#else -# 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(time_t)); + fprintf(f, "%d\n", sizeof(unsigned __int64)); exit(0); } EOF -if { (eval echo configure:7097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:7912: \"$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` + 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_time_t=SIZEOF_LONG_INT + ac_cv_sizeof_unsigned___int64=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof_unsigned___int64" 1>&6 cat >> confdefs.h <&6 -echo "configure:7117: checking size of wchar" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_wchar'+set}'`\" = set"; then +echo $ac_n "checking size of unsigned char *""... $ac_c" 1>&6 +echo "configure:7932: 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(L'a')); + fprintf(f, "%d\n", sizeof(unsigned char *)); exit(0); } EOF -if { (eval echo configure:7136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:7957: \"$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` + 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_wchar=0 + ac_cv_sizeof_unsigned_char_p=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_wchar" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof_unsigned_char_p" 1>&6 cat >> confdefs.h <&6 -echo "configure:7156: checking size of wchar_t" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then +echo $ac_n "checking size of float""... $ac_c" 1>&6 +echo "configure:7977: 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 -#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)); + fprintf(f, "%d\n", sizeof(float)); exit(0); } EOF -if { (eval echo configure:7184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:8002: \"$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` + ac_cv_sizeof_float=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ac_cv_sizeof_wchar_t=SIZEOF_CHAR + ac_cv_sizeof_float=0 fi rm -fr conftest* fi fi -echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 +eval echo "$ac_t""$ac_cv_sizeof_float" 1>&6 cat >> confdefs.h <&6 -echo "configure:7205: checking if char is unsigned" >&5 -if eval "test \"`echo '$''{'ac_cv_type_char_unsigned'+set}'`\" = set"; then +echo $ac_n "checking size of double""... $ac_c" 1>&6 +echo "configure:8022: 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 - ac_cv_type_char_unsigned=no + { 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() { - char c; - - c = -1; - exit(c < 0);} + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(double)); + exit(0); +} EOF -if { (eval echo configure:7224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:8047: \"$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_char_unsigned=yes + ac_cv_sizeof_double=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ac_cv_type_char_unsigned=no + ac_cv_sizeof_double=0 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 +eval echo "$ac_t""$ac_cv_sizeof_double" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7246: checking if va_list is an array" >&5 -if eval "test \"`echo '$''{'ac_cv_type_va_list_array'+set}'`\" = set"; then + +echo $ac_n "checking size of long double""... $ac_c" 1>&6 +echo "configure:8067: 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 < -#else -# include +#include +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ #endif - -int main() { - -va_list a, b; - -a = b; -; return 0; } +#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:7267: \"$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 +if { (eval echo configure:8092: \"$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 -rf conftest* - ac_cv_type_va_list_array=yes + rm -fr conftest* + ac_cv_sizeof_long_double=0 fi -rm -f conftest* +rm -fr 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 +fi +eval echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7287: 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 "checking size of size_t""... $ac_c" 1>&6 +echo "configure:8113: 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 -#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; } +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(size_t)); + exit(0); +} EOF -if { (eval echo configure:7310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_timeval=yes +if { (eval echo configure:8138: \"$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 -rf conftest* - ac_cv_struct_timeval=no + rm -fr conftest* + ac_cv_sizeof_size_t=0 fi -rm -f conftest* +rm -fr 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 +fi +eval echo "$ac_t""$ac_cv_sizeof_size_t" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7330: 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 "checking size of ssize_t""... $ac_c" 1>&6 +echo "configure:8158: 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 < -#ifdef TIME_WITH_SYS_TIME_H -# include -# include -#else -#ifdef HAVE_SYS_TIME_H -# include -#else -# include +#include +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ #endif +#ifdef HAVE_SYS_TYPES_H +#include #endif -int main() { -struct timezone tz; -; return 0; } +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(ssize_t)); + exit(0); +} EOF -if { (eval echo configure:7353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_timezone=yes +if { (eval echo configure:8183: \"$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 -rf conftest* - ac_cv_struct_timezone=no + rm -fr conftest* + ac_cv_sizeof_ssize_t=0 fi -rm -f conftest* +rm -fr 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 +fi +eval echo "$ac_t""$ac_cv_sizeof_ssize_t" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7373: checking if struct mtget contains mt_type" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_type'+set}'`\" = set"; then + +echo $ac_n "checking size of ptrdiff_t""... $ac_c" 1>&6 +echo "configure:8203: 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 -#include -int main() { -struct mtget t; t.mt_type = 0; -; return 0; } +#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:7386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_type=yes +if { (eval echo configure:8228: \"$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 -rf conftest* - ac_cv_struct_mtget_type=no + rm -fr conftest* + ac_cv_sizeof_ptrdiff_t=0 fi -rm -f conftest* +rm -fr 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 +fi +eval echo "$ac_t""$ac_cv_sizeof_ptrdiff_t" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7406: checking if struct mtget contains mt_model" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_model'+set}'`\" = set"; then + + +echo $ac_n "checking size of mode_t""... $ac_c" 1>&6 +echo "configure:8249: 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 -#include -int main() { -struct mtget t; t.mt_model = 0; -; return 0; } +#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:7419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_model=yes +if { (eval echo configure:8274: \"$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 -rf conftest* - ac_cv_struct_mtget_model=no + rm -fr conftest* + ac_cv_sizeof_mode_t=0 fi -rm -f conftest* +rm -fr 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 +fi +eval echo "$ac_t""$ac_cv_sizeof_mode_t" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7439: checking if struct mtget contains mt_dsreg" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg'+set}'`\" = set"; then + +echo $ac_n "checking size of uid_t""... $ac_c" 1>&6 +echo "configure:8294: 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 -#include -int main() { -struct mtget t; t.mt_dsreg = 0; -; return 0; } +#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:7452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_dsreg=yes +if { (eval echo configure:8319: \"$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 -rf conftest* - ac_cv_struct_mtget_dsreg=no + rm -fr conftest* + ac_cv_sizeof_uid_t=0 fi -rm -f conftest* +rm -fr 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 +fi +eval echo "$ac_t""$ac_cv_sizeof_uid_t" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7472: checking if struct mtget contains mt_dsreg1" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg1'+set}'`\" = set"; then + +echo $ac_n "checking size of gid_t""... $ac_c" 1>&6 +echo "configure:8339: 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 -#include -int main() { -struct mtget t; t.mt_dsreg1 = 0; -; return 0; } +#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:7485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_dsreg1=yes +if { (eval echo configure:8364: \"$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 -rf conftest* - ac_cv_struct_mtget_dsreg1=no + rm -fr conftest* + ac_cv_sizeof_gid_t=0 fi -rm -f conftest* +rm -fr 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 +fi +eval echo "$ac_t""$ac_cv_sizeof_gid_t" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7505: checking if struct mtget contains mt_dsreg2" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg2'+set}'`\" = set"; then + +echo $ac_n "checking size of pid_t""... $ac_c" 1>&6 +echo "configure:8384: 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 -#include -int main() { -struct mtget t; t.mt_dsreg2 = 0; -; return 0; } -EOF -if { (eval echo configure:7518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_dsreg2=yes -else +#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:8409: \"$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 -rf conftest* - ac_cv_struct_mtget_dsreg2=no + rm -fr conftest* + ac_cv_sizeof_pid_t=0 fi -rm -f conftest* +rm -fr 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 +fi +eval echo "$ac_t""$ac_cv_sizeof_pid_t" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7538: checking if struct mtget contains mt_gstat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_gstat'+set}'`\" = set"; then + + +echo $ac_n "checking size of dev_t""... $ac_c" 1>&6 +echo "configure:8430: 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 -#include -int main() { -struct mtget t; t.mt_gstat = 0; -; return 0; } +#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:7551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_gstat=yes +if { (eval echo configure:8455: \"$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 -rf conftest* - ac_cv_struct_mtget_gstat=no + rm -fr conftest* + ac_cv_sizeof_dev_t=0 fi -rm -f conftest* +rm -fr 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 +fi +eval echo "$ac_t""$ac_cv_sizeof_dev_t" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7571: checking if struct mtget contains mt_erreg" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_erreg'+set}'`\" = set"; then + +echo $ac_n "checking size of major_t""... $ac_c" 1>&6 +echo "configure:8475: 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 -#include -int main() { -struct mtget t; t.mt_erreg = 0; -; return 0; } +#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:7584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_erreg=yes +if { (eval echo configure:8500: \"$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 -rf conftest* - ac_cv_struct_mtget_erreg=no + rm -fr conftest* + ac_cv_sizeof_major_t=0 fi -rm -f conftest* +rm -fr 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 +fi +eval echo "$ac_t""$ac_cv_sizeof_major_t" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7604: checking if struct mtget contains mt_resid" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_resid'+set}'`\" = set"; then + +echo $ac_n "checking size of minor_t""... $ac_c" 1>&6 +echo "configure:8520: 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 -#include -int main() { -struct mtget t; t.mt_resid = 0; -; return 0; } +#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:7617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_resid=yes +if { (eval echo configure:8545: \"$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 -rf conftest* - ac_cv_struct_mtget_resid=no + rm -fr conftest* + ac_cv_sizeof_minor_t=0 fi -rm -f conftest* +rm -fr 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 +fi +eval echo "$ac_t""$ac_cv_sizeof_minor_t" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7637: checking if struct mtget contains mt_fileno" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_fileno'+set}'`\" = set"; then + + +echo $ac_n "checking size of time_t""... $ac_c" 1>&6 +echo "configure:8566: 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 -#include -int main() { -struct mtget t; t.mt_fileno = 0; -; return 0; } +#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:7650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_fileno=yes +if { (eval echo configure:8596: \"$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 -rf conftest* - ac_cv_struct_mtget_fileno=no + rm -fr conftest* + ac_cv_sizeof_time_t=SIZEOF_LONG_INT fi -rm -f conftest* +rm -fr 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 +fi +eval echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7670: checking if struct mtget contains mt_blkno" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_blkno'+set}'`\" = set"; then + +echo $ac_n "checking size of wchar""... $ac_c" 1>&6 +echo "configure:8616: 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 < -#include -int main() { -struct mtget t; t.mt_blkno = 0; -; return 0; } +#include +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(L'a')); + exit(0); +} EOF -if { (eval echo configure:7683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_blkno=yes +if { (eval echo configure:8635: \"$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 -rf conftest* - ac_cv_struct_mtget_blkno=no + rm -fr conftest* + ac_cv_sizeof_wchar=0 fi -rm -f conftest* +rm -fr 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 +fi +eval echo "$ac_t""$ac_cv_sizeof_wchar" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7703: checking if struct mtget contains mt_flags" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_flags'+set}'`\" = set"; then + +echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 +echo "configure:8655: 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 -#include -int main() { -struct mtget t; t.mt_flags = 0; -; return 0; } +#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:7716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_flags=yes +if { (eval echo configure:8683: \"$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 -rf conftest* - ac_cv_struct_mtget_flags=no + rm -fr conftest* + ac_cv_sizeof_wchar_t=SIZEOF_CHAR fi -rm -f conftest* +rm -fr 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 +fi +eval echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 +cat >> confdefs.h <&6 -echo "configure:7736: checking if struct mtget contains mt_bf" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_bf'+set}'`\" = set"; then + + +echo $ac_n "checking if char is unsigned""... $ac_c" 1>&6 +echo "configure:8704: 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 < -#include -int main() { -struct mtget t; t.mt_bf = 0; -; return 0; } + +int +main() +{ + char c; + + c = -1; + exit(c < 0);} EOF -if { (eval echo configure:7749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_bf=yes +if { (eval echo configure:8723: \"$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_char_unsigned=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_mtget_bf=no + rm -fr conftest* + ac_cv_type_char_unsigned=no fi -rm -f conftest* +rm -fr conftest* fi -echo "$ac_t""$ac_cv_struct_mtget_bf" 1>&6 -if test $ac_cv_struct_mtget_bf = yes; then +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 HAVE_MTGET_BF 1 +#define CHAR_IS_UNSIGNED 1 EOF fi -echo $ac_n "checking if struct rusage is declared in sys/resource.h""... $ac_c" 1>&6 -echo "configure:7769: 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 "checking if va_list is an array""... $ac_c" 1>&6 +echo "configure:8745: 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 < -#include + +#ifdef HAVE_STDARG_H +# include +#else +# include +#endif + int main() { -struct rusage r; + +va_list a, b; + +a = b; ; return 0; } EOF -if { (eval echo configure:7782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_struct_rusage=yes + ac_cv_type_va_list_array=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_rusage=no + ac_cv_type_va_list_array=yes fi rm -f conftest* fi -echo "$ac_t""$ac_cv_struct_rusage" 1>&6 -if test $ac_cv_struct_rusage = yes; then +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 HAVE_STRUCT_RUSAGE 1 +#define VA_LIST_IS_ARRAY 1 EOF fi -echo $ac_n "checking if struct siginfo contains si_utime""... $ac_c" 1>&6 -echo "configure:7802: checking if struct siginfo contains si_utime" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_si_utime'+set}'`\" = set"; then +echo $ac_n "checking for f->_flags in FILE *""... $ac_c" 1>&6 +echo "configure:8786: 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 < -#include +#include int main() { -struct siginfo si; si.si_utime = 0; +FILE *f; +int flags; +f = fopen("confdefs.h", "r"); +flags = f->_flags; +fclose(f); ; return 0; } EOF -if { (eval echo configure:7815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_struct_si_utime=yes + ac_cv_file__flags=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_si_utime=no + ac_cv_file__flags=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 +eval echo "$ac_t""$ac_cv_file__flags" 1>&6 +if test $ac_cv_file__flags = yes; then cat >> confdefs.h <<\EOF -#define HAVE_SI_UTIME 1 +#define HAVE_FILE__FLAGS 1 EOF fi -echo $ac_n "checking if struct sockaddr_storage is declared in socket.h""... $ac_c" 1>&6 -echo "configure:7835: 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 "checking for f->_IO_buf_base in FILE *""... $ac_c" 1>&6 +echo "configure:8822: 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 < +#include int main() { -struct sockaddr_storage ss; ss.ss_family = 0; +FILE *f; +char *ptr; +f = fopen("confdefs.h", "r"); +ptr = f->_IO_buf_base; +fclose(f); ; return 0; } EOF -if { (eval echo configure:7847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_struct_sockaddr_storage=yes + ac_cv_file__io_buf_base=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_sockaddr_storage=no + ac_cv_file__io_buf_base=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 +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_SOCKADDR_STORAGE 1 +#define HAVE_FILE__IO_BUF_BASE 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:7867: 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 "checking for struct timeval in time.h or sys/time.h""... $ac_c" 1>&6 +echo "configure:8858: 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 < -#include -#include +#ifdef TIME_WITH_SYS_TIME_H +# include +# include +#else +#ifdef HAVE_SYS_TIME_H +# include +#else +# include +#endif +#endif int main() { -union semun s; +struct timeval tv; ; return 0; } EOF -if { (eval echo configure:7881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_union_semun=yes + ac_cv_struct_timeval=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_union_semun=no + ac_cv_struct_timeval=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 +eval echo "$ac_t""$ac_cv_struct_timeval" 1>&6 +if test $ac_cv_struct_timeval = yes; then cat >> confdefs.h <<\EOF -#define HAVE_UNION_SEMUN 1 +#define HAVE_STRUCT_TIMEVAL 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:7901: 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 "checking for struct timezone in time.h or sys/time.h""... $ac_c" 1>&6 +echo "configure:8901: 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 < -#if defined(HAVE_WAIT_H) -# include +#ifdef TIME_WITH_SYS_TIME_H +# include +# include #else -#include +#ifdef HAVE_SYS_TIME_H +# include +#else +# include +#endif #endif int main() { -union wait w; +struct timezone tz; ; return 0; } EOF -if { (eval echo configure:7918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_union_wait=yes + ac_cv_struct_timezone=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_union_wait=no + ac_cv_struct_timezone=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 +eval echo "$ac_t""$ac_cv_struct_timezone" 1>&6 +if test $ac_cv_struct_timezone = yes; then cat >> confdefs.h <<\EOF -#define HAVE_UNION_WAIT 1 +#define HAVE_STRUCT_TIMEZONE 1 EOF fi -echo $ac_n "checking if union wait is used by default""... $ac_c" 1>&6 -echo "configure:7938: checking if union wait is used by default" >&5 -if eval "test \"`echo '$''{'ac_cv_use_union_wait'+set}'`\" = set"; then +echo $ac_n "checking for struct timespec in time.h or sys/time.h""... $ac_c" 1>&6 +echo "configure:8944: 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 < -#if defined(HAVE_WAIT_H) -# include +#ifdef TIME_WITH_SYS_TIME_H +# include +# include #else -#include +#ifdef HAVE_SYS_TIME_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) +#endif +int main() { +struct timespec ts; +; return 0; } EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "xxzzy.*x_|xxzzy.*union" >/dev/null 2>&1; then +if { (eval echo configure:8967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_use_union_wait=yes + ac_cv_struct_timespec=yes else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_use_union_wait=no + ac_cv_struct_timespec=no fi rm -f conftest* - fi -echo "$ac_t""$ac_cv_use_union_wait" 1>&6 -if test $ac_cv_use_union_wait = yes; then + +eval echo "$ac_t""$ac_cv_struct_timespec" 1>&6 +if test $ac_cv_struct_timespec = yes; then cat >> confdefs.h <<\EOF -#define USE_UNION_WAIT 1 +#define HAVE_STRUCT_TIMESPEC 1 EOF fi -echo $ac_n "checking if struct stat contains st_spare1""... $ac_c" 1>&6 -echo "configure:7978: checking if struct stat contains st_spare1" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_spare1'+set}'`\" = set"; then +echo $ac_n "checking if struct mtget contains mt_type""... $ac_c" 1>&6 +echo "configure:8987: 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 +#include int main() { -struct stat s; s.st_spare1 = 0; +struct mtget t; t.mt_type = 0; ; return 0; } EOF -if { (eval echo configure:7991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_st_spare1=yes + ac_cv_struct_mtget_type=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_st_spare1=no + ac_cv_struct_mtget_type=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 +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_ST_SPARE1 1 +#define HAVE_MTGET_TYPE 1 EOF fi -echo $ac_n "checking if struct stat contains st_atimensec""... $ac_c" 1>&6 -echo "configure:8011: checking if struct stat contains st_atimensec" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_atimensec'+set}'`\" = set"; then +echo $ac_n "checking if struct mtget contains mt_model""... $ac_c" 1>&6 +echo "configure:9020: 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 +#include int main() { -struct stat s; s.st_atimensec = 0; +struct mtget t; t.mt_model = 0; ; return 0; } EOF -if { (eval echo configure:8024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_st_atimensec=yes + ac_cv_struct_mtget_model=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_st_atimensec=no + ac_cv_struct_mtget_model=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 +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_ST_ATIMENSEC 1 +#define HAVE_MTGET_MODEL 1 EOF fi -echo $ac_n "checking if struct stat contains st_atime_n""... $ac_c" 1>&6 -echo "configure:8044: 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 "checking if struct mtget contains mt_dsreg""... $ac_c" 1>&6 +echo "configure:9053: 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 +#include int main() { -struct stat s; s.st_atime_n = 0; +struct mtget t; t.mt_dsreg = 0; ; return 0; } EOF -if { (eval echo configure:8057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_st_atime_n=yes + ac_cv_struct_mtget_dsreg=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_st_atime_n=no + ac_cv_struct_mtget_dsreg=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_struct_st_atime_n" 1>&6 -if test $ac_cv_struct_st_atime_n = yes; then +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_ST_ATIME_N 1 +#define HAVE_MTGET_DSREG 1 EOF fi -echo $ac_n "checking if struct stat contains st_atim.tv_nsec""... $ac_c" 1>&6 -echo "configure:8077: 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 "checking if struct mtget contains mt_dsreg1""... $ac_c" 1>&6 +echo "configure:9086: 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 +#include int main() { -struct stat s; s.st_atim.tv_nsec = 0; +struct mtget t; t.mt_dsreg1 = 0; ; return 0; } EOF -if { (eval echo configure:8090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_st_nsec=yes + ac_cv_struct_mtget_dsreg1=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_st_nsec=no + ac_cv_struct_mtget_dsreg1=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 +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_ST_NSEC 1 +#define HAVE_MTGET_DSREG1 1 EOF fi -echo $ac_n "checking if struct stat contains st_atim.st__tim.tv_nsec""... $ac_c" 1>&6 -echo "configure:8110: 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 "checking if struct mtget contains mt_dsreg2""... $ac_c" 1>&6 +echo "configure:9119: 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 +#include int main() { -struct stat s; s.st_atim.st__tim.tv_nsec = 0; +struct mtget t; t.mt_dsreg2 = 0; ; return 0; } EOF -if { (eval echo configure:8123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_st__tim=yes + ac_cv_struct_mtget_dsreg2=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_st__tim=no + ac_cv_struct_mtget_dsreg2=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 +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_ST__TIM 1 +#define HAVE_MTGET_DSREG2 1 EOF fi -echo $ac_n "checking if struct stat contains st_atimespec.tv_nsec""... $ac_c" 1>&6 -echo "configure:8143: 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 "checking if struct mtget contains mt_gstat""... $ac_c" 1>&6 +echo "configure:9152: 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 +#include int main() { -struct stat s; s.st_atimespec.tv_nsec = 0; +struct mtget t; t.mt_gstat = 0; ; return 0; } EOF -if { (eval echo configure:8156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_st_atimespec=yes + ac_cv_struct_mtget_gstat=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_st_atimespec=no + ac_cv_struct_mtget_gstat=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 +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_ST_ATIMESPEC 1 +#define HAVE_MTGET_GSTAT 1 EOF fi -echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:8176: checking for st_blksize in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then +echo $ac_n "checking if struct mtget contains mt_erreg""... $ac_c" 1>&6 +echo "configure:9185: 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 +#include int main() { -struct stat s; s.st_blksize; +struct mtget t; t.mt_erreg = 0; ; return 0; } EOF -if { (eval echo configure:8189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_st_blksize=yes + ac_cv_struct_mtget_erreg=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_st_blksize=no + ac_cv_struct_mtget_erreg=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 +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_ST_BLKSIZE 1 +#define HAVE_MTGET_ERREG 1 EOF fi - -echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:8210: checking for st_blocks in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then +echo $ac_n "checking if struct mtget contains mt_resid""... $ac_c" 1>&6 +echo "configure:9218: 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 +#include int main() { -struct stat s; s.st_blocks; +struct mtget t; t.mt_resid = 0; ; return 0; } EOF -if { (eval echo configure:8223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_st_blocks=yes + ac_cv_struct_mtget_resid=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_st_blocks=no + ac_cv_struct_mtget_resid=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 +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_ST_BLOCKS 1 +#define HAVE_MTGET_RESID 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:8246: checking if struct stat contains st_fstype" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_fstype'+set}'`\" = set"; then +echo $ac_n "checking if struct mtget contains mt_fileno""... $ac_c" 1>&6 +echo "configure:9251: 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 +#include int main() { -struct stat s; s.st_fstype[0] = 0; +struct mtget t; t.mt_fileno = 0; ; return 0; } EOF -if { (eval echo configure:8259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_st_fstype=yes + ac_cv_struct_mtget_fileno=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_st_fstype=no + ac_cv_struct_mtget_fileno=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 +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_ST_FSTYPE 1 +#define HAVE_MTGET_FILENO 1 EOF fi -echo $ac_n "checking if struct stat contains st_aclcnt""... $ac_c" 1>&6 -echo "configure:8279: checking if struct stat contains st_aclcnt" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_aclcnt'+set}'`\" = set"; then +echo $ac_n "checking if struct mtget contains mt_blkno""... $ac_c" 1>&6 +echo "configure:9284: 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 +#include int main() { -struct stat s; s.st_aclcnt = 0; +struct mtget t; t.mt_blkno = 0; ; return 0; } EOF -if { (eval echo configure:8292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_st_aclcnt=yes + ac_cv_struct_mtget_blkno=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_st_aclcnt=no + ac_cv_struct_mtget_blkno=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 +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_ST_ACLCNT 1 +#define HAVE_MTGET_BLKNO 1 EOF fi -echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:8312: checking for st_rdev in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then +echo $ac_n "checking if struct mtget contains mt_flags""... $ac_c" 1>&6 +echo "configure:9317: 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 +#include int main() { -struct stat s; s.st_rdev; +struct mtget t; t.mt_flags = 0; ; return 0; } EOF -if { (eval echo configure:8325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_st_rdev=yes + ac_cv_struct_mtget_flags=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_st_rdev=no + ac_cv_struct_mtget_flags=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 +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_ST_RDEV 1 +#define HAVE_MTGET_FLAGS 1 EOF fi - -echo $ac_n "checking if struct stat contains st_flag""... $ac_c" 1>&6 -echo "configure:8346: checking if struct stat contains st_flag" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_flag'+set}'`\" = set"; then +echo $ac_n "checking if struct mtget contains mt_bf""... $ac_c" 1>&6 +echo "configure:9350: 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 +#include int main() { -struct stat s; s.st_flag = 0; +struct mtget t; t.mt_bf = 0; ; return 0; } EOF -if { (eval echo configure:8359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_st_flag=yes + ac_cv_struct_mtget_bf=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_st_flag=no + ac_cv_struct_mtget_bf=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_struct_st_flag" 1>&6 -if test $ac_cv_struct_st_flag = yes; then +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_ST_FLAG 1 +#define HAVE_MTGET_BF 1 EOF fi -echo $ac_n "checking if struct stat contains st_flags""... $ac_c" 1>&6 -echo "configure:8379: checking if struct stat contains st_flags" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_flags'+set}'`\" = set"; then +echo $ac_n "checking if struct rusage is declared in sys/resource.h""... $ac_c" 1>&6 +echo "configure:9383: 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 +#include +#include int main() { -struct stat s; s.st_flags = 0; +struct rusage r; ; return 0; } EOF -if { (eval echo configure:8392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_st_flags=yes + ac_cv_struct_rusage=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_st_flags=no + ac_cv_struct_rusage=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 +eval echo "$ac_t""$ac_cv_struct_rusage" 1>&6 +if test $ac_cv_struct_rusage = yes; then cat >> confdefs.h <<\EOF -#define HAVE_ST_FLAGS 1 +#define HAVE_STRUCT_RUSAGE 1 EOF fi -echo $ac_n "checking if struct dirent contains d_ino""... $ac_c" 1>&6 -echo "configure:8412: checking if struct dirent contains d_ino" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_dirent_d_ino'+set}'`\" = set"; then +echo $ac_n "checking if struct siginfo contains si_utime""... $ac_c" 1>&6 +echo "configure:9416: 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 < -#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 */ - +#include +#include int main() { -struct dirent d; d.d_ino = 0; +struct siginfo si; si.si_utime = 0; ; return 0; } EOF -if { (eval echo configure:8456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_dirent_d_ino=yes + ac_cv_struct_si_utime=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_dirent_d_ino=no + ac_cv_struct_si_utime=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 +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_DIRENT_D_INO 1 +#define HAVE_SI_UTIME 1 EOF fi -echo $ac_n "checking if DIR * contains dd_fd""... $ac_c" 1>&6 -echo "configure:8476: checking if DIR * contains dd_fd" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_dir_dd_fd'+set}'`\" = set"; then +echo $ac_n "checking if struct sockaddr_storage is declared in socket.h""... $ac_c" 1>&6 +echo "configure:9449: 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 < +#include int main() { -DIR d; d.dd_fd = 0; +struct sockaddr_storage ss; ss.ss_family = 0; exit (ss.ss_family == 0); ; return 0; } EOF -if { (eval echo configure:8488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_dir_dd_fd=yes + ac_cv_struct_sockaddr_storage=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_dir_dd_fd=no + ac_cv_struct_sockaddr_storage=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 +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_DIR_DD_FD 1 +#define HAVE_SOCKADDR_STORAGE 1 EOF fi -echo $ac_n "checking if struct utsname contains arch""... $ac_c" 1>&6 -echo "configure:8508: checking if struct utsname contains arch" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_utsname_arch'+set}'`\" = set"; then +echo $ac_n "checking if an illegal declaration for union semun in sys/sem.h exists""... $ac_c" 1>&6 +echo "configure:9481: 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 +#include int main() { -struct utsname u; u.arch[0] = 0; +union semun s; ; return 0; } EOF -if { (eval echo configure:8520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_utsname_arch=yes + ac_cv_struct_union_semun=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_utsname_arch=no + ac_cv_struct_union_semun=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_struct_utsname_arch" 1>&6 -if test $ac_cv_struct_utsname_arch = yes; then +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_UTSNAME_ARCH 1 +#define HAVE_UNION_SEMUN 1 EOF fi -echo $ac_n "checking if struct utsname contains processor""... $ac_c" 1>&6 -echo "configure:8540: checking if struct utsname contains processor" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_utsname_processor'+set}'`\" = set"; then +echo $ac_n "checking if union wait is declared in wait.h or sys/wait.h""... $ac_c" 1>&6 +echo "configure:9515: 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 < +#include +#if defined(HAVE_WAIT_H) +# include +#else +#include +#endif int main() { -struct utsname u; u.processor[0] = 0; +union wait w; ; return 0; } EOF -if { (eval echo configure:8552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_utsname_processor=yes + ac_cv_struct_union_wait=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_utsname_processor=no + ac_cv_struct_union_wait=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 +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_UTSNAME_PROCESSOR 1 +#define HAVE_UNION_WAIT 1 EOF fi -echo $ac_n "checking if struct utsname contains sysname_host""... $ac_c" 1>&6 -echo "configure:8572: checking if struct utsname contains sysname_host" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_utsname_sysname_host'+set}'`\" = set"; then +echo $ac_n "checking if union wait is used by default""... $ac_c" 1>&6 +echo "configure:9552: 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 < -int main() { -struct utsname u; u.sysname_host[0] = 0; -; return 0; } -EOF -if { (eval echo configure:8584: \"$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 +#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) +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 -echo "$ac_t""$ac_cv_struct_utsname_sysname_host" 1>&6 -if test $ac_cv_struct_utsname_sysname_host = yes; then +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 HAVE_UTSNAME_SYSNAME_HOST 1 +#define USE_UNION_WAIT 1 EOF fi -echo $ac_n "checking if struct utsname contains release_host""... $ac_c" 1>&6 -echo "configure:8604: checking if struct utsname contains release_host" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_utsname_release_host'+set}'`\" = set"; then +echo $ac_n "checking if struct stat contains st_spare1""... $ac_c" 1>&6 +echo "configure:9592: 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 +#include int main() { -struct utsname u; u.release_host[0] = 0; +struct stat s; s.st_spare1 = 0; ; return 0; } EOF -if { (eval echo configure:8616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_utsname_release_host=yes + ac_cv_struct_st_spare1=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_utsname_release_host=no + ac_cv_struct_st_spare1=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 +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_UTSNAME_RELEASE_HOST 1 +#define HAVE_ST_SPARE1 1 EOF fi -echo $ac_n "checking if struct utsname contains version_host""... $ac_c" 1>&6 -echo "configure:8636: checking if struct utsname contains version_host" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_utsname_version_host'+set}'`\" = set"; then +echo $ac_n "checking if struct stat contains st_atimensec""... $ac_c" 1>&6 +echo "configure:9625: 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 +#include int main() { -struct utsname u; u.version_host[0] = 0; +struct stat s; s.st_atimensec = 0; ; return 0; } EOF -if { (eval echo configure:8648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_struct_utsname_version_host=yes + ac_cv_struct_st_atimensec=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_struct_utsname_version_host=no + ac_cv_struct_st_atimensec=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 +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_UTSNAME_VERSION_HOST 1 +#define HAVE_ST_ATIMENSEC 1 EOF fi - -echo $ac_n "checking whether iconv() uses const char **""... $ac_c" 1>&6 -echo "configure:8669: checking whether iconv() uses const char **" >&5 -if eval "test \"`echo '$''{'ac_cv_iconv_const'+set}'`\" = set"; then +echo $ac_n "checking if struct stat contains st_atime_n""... $ac_c" 1>&6 +echo "configure:9658: 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.c < + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_atime_n = 0; +; return 0; } EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:8676: \"$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 +if { (eval echo configure:9671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_atime_n=yes else - ac_cv_iconv_const=no + 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 -echo "$ac_t""$ac_cv_iconv_const" 1>&6 -if test $ac_cv_iconv_const = yes; then +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_ICONV_CONST 1 +#define HAVE_ST_ATIME_N 1 EOF fi - -echo $ac_n "checking if stat is declared""... $ac_c" 1>&6 -echo "configure:8692: checking if stat is declared" >&5 -if eval "test \"`echo '$''{'ac_cv_have_decl_stat'+set}'`\" = set"; then +echo $ac_n "checking if struct stat contains st_atim.tv_nsec""... $ac_c" 1>&6 +echo "configure:9691: 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() { - char *p = (char *) stat; +struct stat s; s.st_atim.tv_nsec = 0; ; return 0; } EOF -if { (eval echo configure:8706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_have_decl_stat=yes + ac_cv_struct_st_nsec=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_have_decl_stat=no + ac_cv_struct_st_nsec=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 +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 lstat is declared""... $ac_c" 1>&6 -echo "configure:8727: checking if lstat is declared" >&5 -if eval "test \"`echo '$''{'ac_cv_have_decl_lstat'+set}'`\" = set"; then +echo $ac_n "checking if struct stat contains st_atim.st__tim.tv_nsec""... $ac_c" 1>&6 +echo "configure:9724: 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() { - char *p = (char *) lstat; +struct stat s; s.st_atim.st__tim.tv_nsec = 0; ; return 0; } EOF -if { (eval echo configure:8741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_have_decl_lstat=yes + ac_cv_struct_st__tim=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_have_decl_lstat=no + ac_cv_struct_st__tim=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 +if test $ac_cv_struct_st__tim = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST__TIM 1 EOF fi - -echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:8763: checking for wait3 that fills in rusage" >&5 -if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then +echo $ac_n "checking if struct stat contains st_atimespec.tv_nsec""... $ac_c" 1>&6 +echo "configure:9757: 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 - 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); - } -} +#include +int main() { +struct stat s; s.st_atimespec.tv_nsec = 0; +; return 0; } EOF -if { (eval echo configure:8806: \"$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 +if { (eval echo configure:9770: \"$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 -fr conftest* - ac_cv_func_wait3_rusage=no -fi -rm -fr conftest* + rm -rf conftest* + ac_cv_struct_st_atimespec=no fi - +rm -f conftest* fi -echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6 -if test $ac_cv_func_wait3_rusage = yes; then +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_WAIT3 1 +#define HAVE_ST_ATIMESPEC 1 EOF fi - -echo $ac_n "checking for mlock""... $ac_c" 1>&6 -echo "configure:8829: checking for mlock" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mlock'+set}'`\" = set"; then +echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 +echo "configure:9790: 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 - 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); -} +#include +int main() { +struct stat s; s.st_blksize; +; return 0; } EOF -if { (eval echo configure:8857: \"$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 +if { (eval echo configure:9803: \"$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 -fr conftest* - ac_cv_func_mlock=no -fi -rm -fr conftest* + rm -rf conftest* + ac_cv_struct_st_blksize=no fi - -rm -f core core.* *.core +rm -f conftest* fi -echo "$ac_t""$ac_cv_func_mlock" 1>&6 -if test $ac_cv_func_mlock = yes; then +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_MLOCK 1 +#define HAVE_ST_BLKSIZE 1 EOF fi -echo $ac_n "checking for mlockall""... $ac_c" 1>&6 -echo "configure:8880: checking for mlockall" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mlockall'+set}'`\" = set"; then + +echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 +echo "configure:9824: 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 - 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); -} - +#include +int main() { +struct stat s; s.st_blocks; +; return 0; } EOF -if { (eval echo configure:8911: \"$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 +if { (eval echo configure:9837: \"$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 -fr conftest* - ac_cv_func_mlockall=no -fi -rm -fr conftest* + rm -rf conftest* + ac_cv_struct_st_blocks=no fi - -rm -f core core.* *.core +rm -f conftest* fi -echo "$ac_t""$ac_cv_func_mlockall" 1>&6 -if test $ac_cv_func_mlockall = yes; then +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_MLOCKALL 1 +#define HAVE_ST_BLOCKS 1 EOF +else + LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" fi -echo $ac_n "checking for va_copy""... $ac_c" 1>&6 -echo "configure:8934: checking for va_copy" >&5 -if eval "test \"`echo '$''{'ac_cv_func_va_copy'+set}'`\" = set"; then + +echo $ac_n "checking if struct stat contains st_fstype""... $ac_c" 1>&6 +echo "configure:9860: 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 < -#else -# include -#endif +#include +#include int main() { - -va_list a, b; - -va_copy(a, b); +struct stat s; s.st_fstype[0] = 0; ; return 0; } EOF -if { (eval echo configure:8954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_func_va_copy=yes + ac_cv_struct_st_fstype=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_func_va_copy=no + ac_cv_struct_st_fstype=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 +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_VA_COPY 1 +#define HAVE_ST_FSTYPE 1 EOF fi -echo $ac_n "checking for __va_copy""... $ac_c" 1>&6 -echo "configure:8974: checking for __va_copy" >&5 -if eval "test \"`echo '$''{'ac_cv_func__va_copy'+set}'`\" = set"; then +echo $ac_n "checking if struct stat contains st_aclcnt""... $ac_c" 1>&6 +echo "configure:9893: 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 < -#else -# include -#endif +#include +#include int main() { - -va_list a, b; - -__va_copy(a, b); +struct stat s; s.st_aclcnt = 0; ; return 0; } EOF -if { (eval echo configure:8994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_func__va_copy=yes + ac_cv_struct_st_aclcnt=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_func__va_copy=no + ac_cv_struct_st_aclcnt=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 +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__VA_COPY 1 +#define HAVE_ST_ACLCNT 1 EOF fi -echo $ac_n "checking for working ecvt() ""... $ac_c" 1>&6 -echo "configure:9014: checking for working ecvt() " >&5 -if eval "test \"`echo '$''{'ac_cv_func_ecvt'+set}'`\" = set"; then +echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 +echo "configure:9926: 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 - 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 s; s.st_rdev; +; return 0; } EOF -if { (eval echo configure:9042: \"$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_ecvt=yes +if { (eval echo configure:9939: \"$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 -fr conftest* - ac_cv_func_ecvt=no -fi -rm -fr conftest* + rm -rf conftest* + ac_cv_struct_st_rdev=no fi - +rm -f conftest* fi -echo "$ac_t""$ac_cv_func_ecvt" 1>&6 -if test $ac_cv_func_ecvt = yes; then +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_ECVT 1 +#define HAVE_ST_RDEV 1 EOF fi -echo $ac_n "checking for working fcvt() ""... $ac_c" 1>&6 -echo "configure:9064: checking for working fcvt() " >&5 -if eval "test \"`echo '$''{'ac_cv_func_fcvt'+set}'`\" = set"; then + +echo $ac_n "checking if struct stat contains st_flag""... $ac_c" 1>&6 +echo "configure:9960: 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 - 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 s; s.st_flag = 0; +; return 0; } EOF -if { (eval echo configure:9092: \"$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_fcvt=yes +if { (eval echo configure:9973: \"$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 -fr conftest* - ac_cv_func_fcvt=no -fi -rm -fr conftest* + rm -rf conftest* + ac_cv_struct_st_flag=no fi - +rm -f conftest* fi -echo "$ac_t""$ac_cv_func_fcvt" 1>&6 -if test $ac_cv_func_fcvt = yes; then +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_FCVT 1 +#define HAVE_ST_FLAG 1 EOF fi -echo $ac_n "checking for working gcvt() ""... $ac_c" 1>&6 -echo "configure:9114: checking for working gcvt() " >&5 -if eval "test \"`echo '$''{'ac_cv_func_gcvt'+set}'`\" = set"; then +echo $ac_n "checking if struct stat contains st_flags""... $ac_c" 1>&6 +echo "configure:9993: 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 - 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 s; s.st_flags = 0; +; return 0; } EOF -if { (eval echo configure:9142: \"$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_gcvt=yes +if { (eval echo configure:10006: \"$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 -fr conftest* - ac_cv_func_gcvt=no -fi -rm -fr conftest* + rm -rf conftest* + ac_cv_struct_st_flags=no fi - +rm -f conftest* fi -echo "$ac_t""$ac_cv_func_gcvt" 1>&6 -if test $ac_cv_func_gcvt = yes; then +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_GCVT 1 +#define HAVE_ST_FLAGS 1 EOF fi -echo $ac_n "checking for __dtoa""... $ac_c" 1>&6 -echo "configure:9164: checking for __dtoa" >&5 -if eval "test \"`echo '$''{'ac_cv_func_dtoa'+set}'`\" = set"; then +echo $ac_n "checking if struct dirent contains d_ino""... $ac_c" 1>&6 +echo "configure:10026: 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() { -int decpt; int sign; char *ep; char *bp; -bp = __dtoa(0.0, 2, 6, &decpt, &sign, &ep); +struct dirent d; d.d_ino = 0; ; return 0; } EOF -if { (eval echo configure:9177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_func_dtoa=yes + ac_cv_struct_dirent_d_ino=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_func_dtoa=no + ac_cv_struct_dirent_d_ino=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_func_dtoa" 1>&6 -if test $ac_cv_func_dtoa = yes; then +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_DTOA 1 +#define HAVE_DIRENT_D_INO 1 EOF fi -echo $ac_n "checking for __dtoa that needs result ptr""... $ac_c" 1>&6 -echo "configure:9197: checking for __dtoa that needs result ptr" >&5 -if eval "test \"`echo '$''{'ac_cv_func_dtoa_r'+set}'`\" = set"; then +echo $ac_n "checking if DIR * contains dd_fd""... $ac_c" 1>&6 +echo "configure:10090: 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 - 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() { +DIR d; d.dd_fd = 0; exit (d.dd_fd == 0); +; return 0; } EOF -if { (eval echo configure:9226: \"$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_dtoa_r=yes +if { (eval echo configure:10102: \"$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 -fr conftest* - ac_cv_func_dtoa_r=no + rm -rf conftest* + ac_cv_struct_dir_dd_fd=no fi -rm -fr conftest* +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:10122: 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:10134: \"$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 -echo "$ac_t""$ac_cv_func_dtoa_r" 1>&6 -if test $ac_cv_func_dtoa_r = yes; then +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_DTOA_R 1 +#define HAVE_UTSNAME_ARCH 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:9251: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo $ac_n "checking if struct utsname contains processor""... $ac_c" 1>&6 +echo "configure:10154: 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 < +#include +int main() { +struct utsname u; u.processor[0] = 0; +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9261: \"$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 +if { (eval echo configure:10166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + ac_cv_struct_utsname_processor=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" + ac_cv_struct_utsname_processor=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 +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:10186: 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:10198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_utsname_sysname_host=yes else - echo "$ac_t""no" 1>&6 + 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 -done -for ac_func in getpagesize -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9290: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +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:10218: 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 < -/* 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(); - +#include int main() { +struct utsname u; u.release_host[0] = 0; +; return 0; } +EOF +if { (eval echo configure:10230: \"$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 -/* 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 +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:10250: 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:9318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + ac_cv_struct_utsname_version_host=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + ac_cv_struct_utsname_version_host=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 +if test $ac_cv_struct_utsname_version_host = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_UTSNAME_VERSION_HOST 1 EOF - -else - echo "$ac_t""no" 1>&6 + fi -done -echo $ac_n "checking for mmap that needs ptr to size""... $ac_c" 1>&6 -echo "configure:9343: checking for mmap that needs ptr to size" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_sizep'+set}'`\" = set"; then +echo $ac_n "checking whether iconv() uses const char **""... $ac_c" 1>&6 +echo "configure:10283: 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 - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_sizep=no + cat > conftest.c < +EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:10290: \"$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:10306: 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 -#include -#include -#include - -#ifndef MAP_FILE -#define MAP_FILE 0 /* Needed on Apollo Domain/OS */ -#endif +#include +int main() { + char *p = (char *) stat; exit (p != (char *)0 && *p != 0); +; return 0; } +EOF +if { (eval echo configure:10320: \"$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 -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif +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:10341: 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 < -# 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 */ +#include +#include +int main() { + char *p = (char *) lstat; exit (p != (char *)0 && *p != 0); +; return 0; } +EOF +if { (eval echo configure:10355: \"$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 -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } -#else -char *malloc(); -#endif +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:10377: 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:10420: \"$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 -int -main() -{ - char *data, *data2; - int i, pagesize, ps; - int fd; +fi - pagesize = getpagesize(); +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 - /* - * 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); +fi - /* - * 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); +echo $ac_n "checking for mlock""... $ac_c" 1>&6 +echo "configure:10443: 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 - /* - * 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; +main() +{ + if (mlock(0, 0) < 0) { + if (errno == EINVAL || errno == ENOMEM || + errno == EPERM || errno == EACCES) + exit(0); + exit(-1); } - if (data2 != (char *)-1) - exit(1); + exit(0); +} +EOF +if { (eval echo configure:10471: \"$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 - 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); +rm -f core core.* *.core +fi - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit(1); +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 - close(fd); - unlink("conftestmmap"); +fi +echo $ac_n "checking for mlockall""... $ac_c" 1>&6 +echo "configure:10494: 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:9492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null +if { (eval echo configure:10525: \"$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 + ac_cv_func_mlockall=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - ac_cv_func_mmap_sizep=no + 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:10548: 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:10568: \"$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:10588: 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:10608: \"$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:10628: 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:10678: 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:10728: 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:10778: 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:10811: 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:10862: 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:10882: \"$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:10907: 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:10917: \"$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:10943: 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:11092: \"$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:11118: 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:11128: \"$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:11154: 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:11311: \"$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:11337: 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:11347: \"$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:11373: 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:11522: \"$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:11545: 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:11625: \"$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:11647: 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:11674: \"$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:11698: 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:11710: \"$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:11731: 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:11764: \"$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:11796: 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:11826: 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:11854: \"$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:11881: 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:11908: \"$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:11930: 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:11943: \"$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:11963: 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:11979: \"$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:11999: 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:12012: \"$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:12034: 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:12062: \"$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:12088: 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:12098: \"$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:12123: 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:12129: 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:12157: \"$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 +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; + /* + * 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() + + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); + } +} +EOF +if { (eval echo configure:12304: \"$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:12332: 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:12372: 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:12416: 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:12441: \"$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:12463: 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:12480: \"$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:12500: 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:12517: \"$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:12537: 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:12552: \"$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:12572: 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:12588: \"$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:12608: 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:12629: \"$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 %lld""... $ac_c" 1>&6 +echo "configure:12651: 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:12696: 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:12706: \"$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:12733: 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:12755: \"$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:12774: 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:12808: \"$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_func in access eaccess euidaccess +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:12832: 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:12860: \"$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:12887: 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:12915: \"$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:12942: 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:12970: \"$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:12997: 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:13025: \"$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:13052: 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:13080: \"$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 -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 +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_hdr in unistd.h +for ac_func in getcwd shmat semget do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9518: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13107: 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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 -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9528: \"$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 +if { (eval echo configure:13135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "ac_cv_func_$ac_func=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" + eval "ac_cv_func_$ac_func=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___%'` + +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 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in getpagesize +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:9557: checking for $ac_func" >&5 +echo "configure:13162: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13190: \"$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 @@ -9594,246 +13199,191 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:9610: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then +for ac_func in setreuid setresuid seteuid setuid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13217: 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 - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_fixed_mapped=no -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(); -/* 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 */ +int main() { -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } +/* 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 -char *malloc(); +$ac_func(); #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); +; return 0; } +EOF +if { (eval echo configure:13245: \"$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 - /* - * 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); +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 - /* - * 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); -} +for ac_func in setregid setresgid setegid setgid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13272: 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:9767: \"$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 +if { (eval echo configure:13300: \"$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 -fr conftest* - ac_cv_func_mmap_fixed_mapped=no -fi -rm -fr conftest* + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi - +rm -f conftest* 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 +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_hdr in unistd.h +for ac_func in getuid geteuid getgid getegid do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9793: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13327: 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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 -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9803: \"$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 +if { (eval echo configure:13355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "ac_cv_func_$ac_func=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" + eval "ac_cv_func_$ac_func=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___%'` + +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 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in getpagesize +for ac_func in getpid getppid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9832: checking for $ac_func" >&5 +echo "configure:13382: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13410: \"$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 @@ -9869,477 +13419,356 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -echo $ac_n "checking for mmap that needs ptr to size""... $ac_c" 1>&6 -echo "configure:9885: checking for mmap that needs ptr to size" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_sizep'+set}'`\" = set"; then +for ac_func in getpgid setpgid getsid setsid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13437: 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 - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_sizep=no -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(); -#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 */ +int main() { -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } +/* 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 -char *malloc(); +$ac_func(); #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); -} - +; return 0; } EOF -if { (eval echo configure:10034: \"$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 +if { (eval echo configure:13465: \"$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 -fr conftest* - ac_cv_func_mmap_sizep=no -fi -rm -fr conftest* + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi - +rm -f conftest* 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 - +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 mmap works to get shared memory""... $ac_c" 1>&6 -echo "configure:10057: checking if mmap works to get shared memory" >&5 -if eval "test \"`echo '$''{'ac_cv_func_smmap'+set}'`\" = set"; then +for ac_func in getpgrp setpgrp +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13492: 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 - if test "$cross_compiling" = yes; then - ac_cv_func_smmap=no -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(); -#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; +int main() { -#ifdef MAP_ANONYMOUS /* HP/UX */ - f = -1; - addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, f, 0); +/* 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 - if ((f = open("/dev/zero", 2)) < 0) - exit(1); - addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED, f, 0); +$ac_func(); #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); -} +; return 0; } EOF -if { (eval echo configure:10137: \"$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 +if { (eval echo configure:13520: \"$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 -fr conftest* - ac_cv_func_smmap=no -fi -rm -fr conftest* + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi - +rm -f conftest* 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 +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 -echo $ac_n "checking if shmget works to get shared memory""... $ac_c" 1>&6 -echo "configure:10159: checking if shmget works to get shared memory" >&5 -if eval "test \"`echo '$''{'ac_cv_func_shmget'+set}'`\" = set"; then +done + +for ac_func in getpwnam getpwent getpwuid setpwent endpwent +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13547: 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 - if test "$cross_compiling" = yes; then - ac_cv_func_shmget=no -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(); -#include -#include -#include -int -main() -{ - int id; +int main() { - id = shmget(IPC_PRIVATE, 0x1, IPC_CREAT|0600); - if (id == -1) - exit(1); - shmctl(id, IPC_RMID, 0); - exit(0); -} +/* 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:10186: \"$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_shmget=yes +if { (eval echo configure:13575: \"$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 -fr conftest* - ac_cv_func_shmget=no -fi -rm -fr conftest* + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi - +rm -f conftest* fi -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 +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 -# 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:10210: checking for working alloca.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then +done + +for ac_func in getgrnam getgrent getgrgid setgrent endgrent +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13602: 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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() { -char *p = alloca(2 * sizeof(int)); + +/* 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:10222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_header_alloca_h=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_header_alloca_h=no + eval "ac_cv_func_$ac_func=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 +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 alloca""... $ac_c" 1>&6 -echo "configure:10243: checking for alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then +for ac_func in getspnam getspwnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13657: 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 < -# 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 +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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() { -char *p = (char *) alloca(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_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + ; return 0; } EOF -if { (eval echo configure:10276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_func_alloca_works=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_func_alloca_works=no + eval "ac_cv_func_$ac_func=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 +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 -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:10308: checking whether alloca needs Cray hooks" >&5 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then +for ac_func in getlogin +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13712: 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 -wenotbecray +$ac_func(); #endif +; return 0; } EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "webecray" >/dev/null 2>&1; then +if { (eval echo configure:13740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_os_cray=yes + eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_os_cray=no + 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_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:10338: checking for $ac_func" >&5 +for ac_func in sync fsync fork forkx vforkx forkall forkallx wait wait4 waitid waitpid getrusage getrlimit setrlimit ulimit +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13767: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13795: \"$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 @@ -10375,179 +13804,191 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi - done -fi -echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:10393: checking stack direction for C alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then +for ac_func in execl execle execlp execv execve execvp +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13822: 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 - 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:10420: \"$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 +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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(); -echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 -cat >> confdefs.h <&6 -echo "configure:10442: 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:10455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_func_quotaioctl=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_func_quotaioctl=no + eval "ac_cv_func_$ac_func=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 +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 -echo $ac_n "checking for file locking via fcntl""... $ac_c" 1>&6 -echo "configure:10475: checking for file locking via fcntl" >&5 -if eval "test \"`echo '$''{'ac_cv_func_fcntl_lock'+set}'`\" = set"; then +done + +for ac_func in spawnl spawnle spawnlp spawnlpe +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13877: 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(); -#include -#include int main() { -struct flock fl; -fcntl(0, F_SETLK, &fl); +/* 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:10491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_func_fcntl_lock=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_func_fcntl_lock=no + eval "ac_cv_func_$ac_func=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 +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 -echo $ac_n "checking for uname""... $ac_c" 1>&6 -echo "configure:10511: checking for uname" >&5 -if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then +done + +for ac_func in spawnv spawnve spawnvp spawnvpe +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13932: 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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() { -struct utsname un; -uname(&un); + +/* 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:10524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_func_uname=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_func_uname=no + eval "ac_cv_func_$ac_func=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 +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 -for ac_func in execl +done + +for ac_func in cwait do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10546: checking for $ac_func" >&5 +echo "configure:13987: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14015: \"$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 @@ -10583,547 +14024,521 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:10600: 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:10610: \"$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:10635: 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:10641: checking for vfork" >&5 -if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then +for ac_func in getexecname +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14042: 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 vfork(); +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_vfork) || defined (__stub___vfork) +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -vfork(); +$ac_func(); #endif ; return 0; } EOF -if { (eval echo configure:10669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_vfork=yes" + 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_vfork=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : +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 + eval echo "$ac_t""no" 1>&6 fi +done -ac_cv_func_vfork_works=$ac_cv_func_vfork +for ac_func in getprogname setprogname +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14097: 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 < -#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 -main() { - pid_t parent = getpid (); - pid_t child; - -#ifndef VMS - sparc_address_test(0); -#endif - - child = vfork (); +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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(); - 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; +int main() { - /* 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; - /* - * 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); +/* 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 - _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() - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -} +; return 0; } EOF -if { (eval echo configure:10816: \"$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 +if { (eval echo configure:14125: \"$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 -fr conftest* - ac_cv_func_vfork_works=no -fi -rm -fr conftest* + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi - +rm -f conftest* 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 +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 <> confdefs.h <<\EOF -#define HAVE_VFORK 1 -EOF - + eval echo "$ac_t""no" 1>&6 fi +done -echo $ac_n "checking for sys_siglist""... $ac_c" 1>&6 -echo "configure:10844: checking for sys_siglist" >&5 -if eval "test \"`echo '$''{'ac_cv_func_sys_siglist'+set}'`\" = set"; then +for ac_func in proc_pidpath +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14152: 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 - 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 < +/* 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() { -int -main() -{ extern char *sys_siglist[]; -if (sys_siglist[1] == 0) - exit(1); -exit(0);} +/* 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:10862: \"$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_sys_siglist=yes +if { (eval echo configure:14180: \"$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 -fr conftest* - ac_cv_func_sys_siglist=no -fi -rm -fr conftest* + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi - +rm -f conftest* 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 +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 -echo $ac_n "checking for BSD compliant getpgrp""... $ac_c" 1>&6 -echo "configure:10884: checking for BSD compliant getpgrp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_bsd_getpgrp'+set}'`\" = set"; then +done + +for ac_func in gethostid gethostname getdomainname getdtablesize +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14207: 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 - 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 < +/* 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() -{ long p; -/* - * POSIX getpgrp() has void parameter... - */ - p = getpgrp(-1); - if (p == getpgrp(1) && p == getpgrp(getpid())) - exit(1); -exit(0);} +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:10906: \"$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_getpgrp=yes +if { (eval echo configure:14235: \"$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 -fr conftest* - ac_cv_func_bsd_getpgrp=no -fi -rm -fr conftest* + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi - +rm -f conftest* 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 +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 -echo $ac_n "checking for BSD compliant setpgrp""... $ac_c" 1>&6 -echo "configure:10928: checking for BSD compliant setpgrp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_bsd_setpgrp'+set}'`\" = set"; then +done + +for ac_func in gettimeofday settimeofday time stime gethrtime +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14262: 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 - 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 < +/* 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(); -#include -#ifndef HAVE_ERRNO_DEF -extern int errno; +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 -int -main() -{ errno = 0; -/* - * Force illegal pid on BSD - */ -if (setpgrp(-1, 100) < 0 && errno == ESRCH) - exit(0); -exit(1);} + +; return 0; } EOF -if { (eval echo configure:10953: \"$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 +if { (eval echo configure:14290: \"$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 -fr conftest* - ac_cv_func_bsd_setpgrp=no -fi -rm -fr conftest* + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi - +rm -f conftest* 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 +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 -echo $ac_n "checking for C99 compliant isinf""... $ac_c" 1>&6 -echo "configure:10975: checking for C99 compliant isinf" >&5 -if eval "test \"`echo '$''{'ac_cv_func_c99_isinf'+set}'`\" = set"; then +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:14317: 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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() { - double d; -#ifndef isinf -The isinf macro is not defined + +/* 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 (isinf(d)); ; return 0; } EOF -if { (eval echo configure:10992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_func_c99_isinf=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_func_c99_isinf=no + eval "ac_cv_func_$ac_func=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 +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 -echo $ac_n "checking for C99 compliant isnan""... $ac_c" 1>&6 -echo "configure:11012: checking for C99 compliant isnan" >&5 -if eval "test \"`echo '$''{'ac_cv_func_c99_isnan'+set}'`\" = set"; then +done + +for ac_func in ctime cftime ascftime strftime +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14372: 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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() { - double d; -#ifndef isnan -The isnan macro is not defined + +/* 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 (isnan(d)); ; return 0; } EOF -if { (eval echo configure:11029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_func_c99_isnan=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_func_c99_isnan=no + eval "ac_cv_func_$ac_func=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 +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 -echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:11049: checking for sigsetjmp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_sigsetjmp'+set}'`\" = set"; then +done + +for ac_func in poll select isastream +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14427: 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(); -#include int main() { -sigjmp_buf jb; -sigsetjmp(jb, 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_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + ; return 0; } EOF -if { (eval echo configure:11064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_func_sigsetjmp=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_func_sigsetjmp=no + eval "ac_cv_func_$ac_func=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 +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 -echo $ac_n "checking for siglongjmp""... $ac_c" 1>&6 -echo "configure:11084: checking for siglongjmp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_siglongjmp'+set}'`\" = set"; then +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:14482: 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(); -#include int main() { -sigjmp_buf jb; -sigsetjmp(jb, 1); -siglongjmp(jb, 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_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + ; return 0; } EOF -if { (eval echo configure:11100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_func_siglongjmp=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_func_siglongjmp=no + eval "ac_cv_func_$ac_func=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 +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 -for ac_func in access eaccess euidaccess +done + +for ac_func in utimens lutimens do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11122: checking for $ac_func" >&5 +echo "configure:14537: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14565: \"$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 @@ -11159,26 +14574,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in memchr memcpy memmove memset +for ac_func in futimens utimensat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11177: checking for $ac_func" >&5 +echo "configure:14592: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14620: \"$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 @@ -11214,26 +14629,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in brk sbrk strerror nice flock lockf fchdir statvfs quotactl +for ac_func in ioctl fcntl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11232: checking for $ac_func" >&5 +echo "configure:14647: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14675: \"$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 @@ -11269,26 +14684,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in realpath resolvepath +for ac_func in qecvt qfcvt qgcvt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11287: checking for $ac_func" >&5 +echo "configure:14702: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14730: \"$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 @@ -11324,26 +14739,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in dup dup2 +for ac_func in _qecvt _qfcvt _qgcvt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11342: checking for $ac_func" >&5 +echo "configure:14757: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14785: \"$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 @@ -11379,26 +14794,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in getcwd shmat semget +for ac_func in _qecvt_r _qfcvt_r _qgcvt_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11397: checking for $ac_func" >&5 +echo "configure:14812: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14840: \"$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 @@ -11434,26 +14849,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in lstat readlink symlink link rename mkfifo mknod +for ac_func in _ldecvt _ldfcvt _ldgcvt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11452: checking for $ac_func" >&5 +echo "configure:14867: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14895: \"$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 @@ -11489,26 +14904,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in setreuid setresuid seteuid setuid +for ac_func in ecvt_r fcvt_r gcvt_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11507: checking for $ac_func" >&5 +echo "configure:14922: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14950: \"$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 @@ -11544,26 +14959,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in setregid setresgid setegid setgid +for ac_func in _ldecvt_r _ldfcvt_r _ldgcvt_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11562: checking for $ac_func" >&5 +echo "configure:14977: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15005: \"$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 @@ -11599,26 +15014,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in getuid geteuid getgid getegid +for ac_func in econvert fconvert gconvert do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11617: checking for $ac_func" >&5 +echo "configure:15032: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15060: \"$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 @@ -11654,26 +15069,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in getpid getppid +for ac_func in qeconvert qfconvert qgconvert do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11672: checking for $ac_func" >&5 +echo "configure:15087: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15115: \"$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 @@ -11709,26 +15124,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in getpgid setpgid getsid setsid +for ac_func in isinf isnan do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11727: checking for $ac_func" >&5 +echo "configure:15142: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15170: \"$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 @@ -11764,26 +15179,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in getpgrp setpgrp +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:11782: checking for $ac_func" >&5 +echo "configure:15197: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15225: \"$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 @@ -11819,26 +15234,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in getspnam getspwnam +for ac_func in flockfile funlockfile ftrylockfile do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11837: checking for $ac_func" >&5 +echo "configure:15252: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15280: \"$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 @@ -11874,26 +15289,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in sync fsync fork forkx vforkx forkall forkallx wait wait4 waitid waitpid getrusage getrlimit setrlimit ulimit +for ac_func in rand drand48 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11892: checking for $ac_func" >&5 +echo "configure:15307: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15335: \"$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 @@ -11929,26 +15344,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in execl execle execlp execv execve execvp +for ac_func in strtol strtoll strtoul strtoull strtod do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11947: checking for $ac_func" >&5 +echo "configure:15362: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15390: \"$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 @@ -11984,26 +15399,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in getexecname +for ac_func in setpriority DosSetPriority do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12002: checking for $ac_func" >&5 +echo "configure:15417: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15445: \"$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 @@ -12039,26 +15454,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in getprogname setprogname +for ac_func in DosAllocSharedMem do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12057: checking for $ac_func" >&5 +echo "configure:15472: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15500: \"$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 @@ -12094,26 +15509,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in gethostid gethostname getdomainname getpagesize getdtablesize +for ac_func in getdelim do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12112: checking for $ac_func" >&5 +echo "configure:15527: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15555: \"$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 @@ -12149,26 +15564,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in gettimeofday settimeofday time stime gethrtime +for ac_func in seekdir fdopendir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12167: checking for $ac_func" >&5 +echo "configure:15582: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15610: \"$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 @@ -12204,26 +15619,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in ftime tzset mktime gmtime localtime timegm timelocal +for ac_func in openat fstatat fchownat futimesat renameat unlinkat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12222: checking for $ac_func" >&5 +echo "configure:15637: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15665: \"$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 @@ -12259,26 +15674,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in ctime cftime ascftime strftime +for ac_func in attropen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12277: checking for $ac_func" >&5 +echo "configure:15692: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15720: \"$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 @@ -12314,26 +15729,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in poll select isastream +for ac_func in __accessat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12332: checking for $ac_func" >&5 +echo "configure:15747: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15775: \"$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 @@ -12369,26 +15784,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in chown fchown lchown chmod fchmod lchmod times utime utimes futimes lutimes +for ac_func in accessat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12387: checking for $ac_func" >&5 +echo "configure:15802: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15830: \"$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 @@ -12424,26 +15839,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in futimens utimensat +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:12442: checking for $ac_func" >&5 +echo "configure:15857: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15885: \"$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 @@ -12479,26 +15894,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in ecvt_r fcvt_r gcvt_r +for ac_func in pipe _pipe do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12497: checking for $ac_func" >&5 +echo "configure:15912: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15940: \"$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 @@ -12534,26 +15949,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in econvert fconvert gconvert +for ac_func in popen pclose _popen _pclose do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12552: checking for $ac_func" >&5 +echo "configure:15967: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15995: \"$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 @@ -12589,26 +16004,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in isinf isnan +for ac_func in strsignal str2sig sig2str do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12607: checking for $ac_func" >&5 +echo "configure:16022: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16050: \"$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 @@ -12644,26 +16059,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in rand drand48 +for ac_func in kill killpg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12662: checking for $ac_func" >&5 +echo "configure:16077: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16105: \"$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 @@ -12699,26 +16114,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in strtol strtoll strtoul strtoull strtod +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:12717: checking for $ac_func" >&5 +echo "configure:16132: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16160: \"$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 @@ -12754,26 +16169,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in setpriority DosSetPriority +for ac_func in alarm sleep usleep yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12772: checking for $ac_func" >&5 +echo "configure:16187: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16215: \"$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 @@ -12809,26 +16224,110 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in DosAllocSharedMem +echo $ac_n "checking if tcgetattr is defined or function""... $ac_c" 1>&6 +echo "configure:16240: 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:16260: \"$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:16282: 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:16302: \"$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:12827: checking for $ac_func" >&5 +echo "configure:16326: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16354: \"$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 @@ -12864,26 +16363,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in seekdir fdopendir +for ac_func in getenv putenv setenv unsetenv do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12882: checking for $ac_func" >&5 +echo "configure:16381: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16409: \"$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 @@ -12919,26 +16418,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in openat fstatat fchownat futimesat renameat unlinkat +for ac_func in snprintf strcasecmp strncasecmp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12937: checking for $ac_func" >&5 +echo "configure:16436: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16464: \"$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 @@ -12974,26 +16473,118 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&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:16492: 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:16512: \"$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:16537: 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:16557: \"$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:12992: checking for $ac_func" >&5 +echo "configure:16583: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16611: \"$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 @@ -13029,26 +16620,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in __accessat +for ac_func in basename dirname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13047: checking for $ac_func" >&5 +echo "configure:16638: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16666: \"$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 @@ -13084,26 +16675,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in accessat +for ac_func in pathconf fpathconf lpathconf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13102: checking for $ac_func" >&5 +echo "configure:16693: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16721: \"$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 @@ -13139,26 +16730,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in mkdirat faccessat fchmodat linkat mkfifoat mknodat readlinkat symlinkat +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:13157: checking for $ac_func" >&5 +echo "configure:16748: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16776: \"$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 @@ -13194,26 +16785,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in popen pclose _popen _pclose +for ac_func in madvise do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13212: checking for $ac_func" >&5 +echo "configure:16803: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16831: \"$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 @@ -13249,26 +16840,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in strsignal str2sig sig2str +for ac_func in mktemp mkstemp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13267: checking for $ac_func" >&5 +echo "configure:16858: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16886: \"$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 @@ -13304,26 +16895,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in kill killpg +for ac_func in chflags fchflags fflagstostr strtofflags do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13322: checking for $ac_func" >&5 +echo "configure:16913: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16941: \"$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 @@ -13359,26 +16950,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in signal sigrelse sigprocmask sigsetmask sigset sigaltstack +for ac_func in fnmatch do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13377: checking for $ac_func" >&5 +echo "configure:16968: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16996: \"$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 @@ -13414,26 +17005,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in sleep usleep yield +for ac_func in truncate ftruncate do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13432: checking for $ac_func" >&5 +echo "configure:17023: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17051: \"$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 @@ -13469,26 +17060,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in tcgetattr tcsetattr tcgetpgrp tcsetpgrp +for ac_func in getppriv setppriv priv_set do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13487: checking for $ac_func" >&5 +echo "configure:17078: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17106: \"$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 @@ -13524,26 +17115,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in getenv putenv setenv unsetenv +for ac_func in issetugid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13542: checking for $ac_func" >&5 +echo "configure:17133: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17161: \"$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 @@ -13579,26 +17170,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in snprintf strcasecmp +for ac_func in getroles privbit_set do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13597: checking for $ac_func" >&5 +echo "configure:17188: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17216: \"$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 @@ -13634,26 +17225,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in strcat strncat strcmp strncmp strcpy strlcat strlcpy strncpy strdup strndup strlen strnlen strchr strrchr +for ac_func in setlocale localeconv nl_langinfo do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13652: checking for $ac_func" >&5 +echo "configure:17243: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17271: \"$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 @@ -13689,26 +17280,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in wcscat wcsncat wcscmp wcsncmp wcscpy wcslcat wcslcpy wcsncpy wcsdup wcsndup wcslen wcsnlen wcschr wcsrchr +for ac_func in setbuf setvbuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13707: checking for $ac_func" >&5 +echo "configure:17298: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17326: \"$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 @@ -13744,26 +17335,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in wcwidth wcswidth wctype iswctype +for ac_func in clone_area create_area delete_area do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13762: checking for $ac_func" >&5 +echo "configure:17353: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17381: \"$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 @@ -13799,30 +17390,29 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in basename dirname + +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 $ac_func""... $ac_c" 1>&6 -echo "configure:13817: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo $ac_n "checking for raw availability of $ac_func""... $ac_c" 1>&6 +echo "configure:17410: 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 < /* 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. */ @@ -13830,54 +17420,44 @@ 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:13845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17428: \"$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" + 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_func_$ac_func=no" + eval "ac_cv_rfunc_$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'` +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 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in malloc calloc valloc realloc memalign posix_memalign +for ac_func in fspawnv fspawnl fspawnv_nowait do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13872: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo $ac_n "checking for raw availability of $ac_func""... $ac_c" 1>&6 +echo "configure:17455: 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 < /* 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. */ @@ -13885,54 +17465,45 @@ 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:13900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17473: \"$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" + 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_func_$ac_func=no" + eval "ac_cv_rfunc_$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'` +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 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in madvise + +for ac_func in getline fgetline do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13927: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo $ac_n "checking for raw availability of $ac_func""... $ac_c" 1>&6 +echo "configure:17501: 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 < /* 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. */ @@ -13940,1525 +17511,1568 @@ 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:13955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17519: \"$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" + 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_func_$ac_func=no" + eval "ac_cv_rfunc_$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'` +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 + eval echo "$ac_t""no" 1>&6 fi done -for ac_func in mktemp mkstemp -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13982: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +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:17546: 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 < -/* 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(); - +#include 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(); +#ifndef dirfd + char *p = (char *) dirfd; + exit (p != (char *)0 && *p != 0); #endif - ; return 0; } EOF -if { (eval echo configure:14010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17562: \"$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" + eval ac_cv_have_dirfd=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval ac_cv_have_dirfd=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'` +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 + fi -done -for ac_func in chflags fchflags fflagstostr strtofflags -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14037: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + +echo $ac_n "checking if iswprint is defined or function""... $ac_c" 1>&6 +echo "configure:17585: 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 < -/* 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(); + +#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif 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(); +#ifndef iswprint + char *p = (char *) iswprint; + exit (p != (char *)0 && *p != 0); #endif - ; return 0; } EOF -if { (eval echo configure:14065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17608: \"$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" + eval ac_cv_have_iswprint=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval ac_cv_have_iswprint=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'` +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 + fi -done -for ac_func in fnmatch -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14092: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + +echo $ac_n "checking if mbsinit is defined or function""... $ac_c" 1>&6 +echo "configure:17631: 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 < -/* 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(); + +#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif 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(); +#ifndef mbsinit + char *p = (char *) mbsinit; + exit (p != (char *)0 && *p != 0); #endif - ; return 0; } EOF -if { (eval echo configure:14120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17654: \"$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" + eval ac_cv_have_mbsinit=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval ac_cv_have_mbsinit=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'` +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 + fi -done -for ac_func in truncate ftruncate -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14147: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + +echo $ac_n "checking if mbtowc is defined or function""... $ac_c" 1>&6 +echo "configure:17677: 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 < -/* 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() { +#ifdef HAVE_STDLIB_H +#include +#endif + +int main() { + +#ifndef mbtowc + char *p = (char *) mbtowc; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { (eval echo configure:17697: \"$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:17720: 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:14175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17740: \"$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" + eval ac_cv_have_wctomb=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval ac_cv_have_wctomb=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'` +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 + fi -done -for ac_func in getppriv setppriv priv_set -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14202: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + +echo $ac_n "checking if mbrtowc is defined or function""... $ac_c" 1>&6 +echo "configure:17763: 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 < -/* 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(); + +#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif 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(); +#ifndef mbrtowc + char *p = (char *) mbrtowc; + exit (p != (char *)0 && *p != 0); #endif - ; return 0; } EOF -if { (eval echo configure:14230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17786: \"$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" + eval ac_cv_have_mbrtowc=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval ac_cv_have_mbrtowc=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'` +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 + fi -done -for ac_func in getroles privbit_set -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14257: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + +echo $ac_n "checking if wcrtomb is defined or function""... $ac_c" 1>&6 +echo "configure:17809: 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 < -/* 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(); + +#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif 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(); +#ifndef wcrtomb + char *p = (char *) wcrtomb; + exit (p != (char *)0 && *p != 0); #endif - ; return 0; } EOF -if { (eval echo configure:14285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17832: \"$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" + eval ac_cv_have_wcrtomb=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval ac_cv_have_wcrtomb=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'` +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 + fi -done -for ac_func in setlocale localeconv nl_langinfo -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14312: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + +echo $ac_n "checking if finite is defined or function""... $ac_c" 1>&6 +echo "configure:17855: 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 < -/* 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(); - +#include 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(); +#ifndef finite + char *p = (char *) finite; + exit (p != (char *)0 && *p != 0); #endif - ; return 0; } EOF -if { (eval echo configure:14340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17871: \"$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" + eval ac_cv_have_finite=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval ac_cv_have_finite=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'` +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 + fi -done -for ac_func in setbuf setvbuf -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14367: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo $ac_n "checking if isnand is defined or function""... $ac_c" 1>&6 +echo "configure:17893: 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 < -/* 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(); - +#include 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(); +#ifndef isnand + char *p = (char *) isnand; + exit (p != (char *)0 && *p != 0); #endif - ; return 0; } EOF -if { (eval echo configure:14395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +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_func_$ac_func=yes" + eval ac_cv_have_isnand=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval ac_cv_have_isnand=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'` +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 + 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:14422: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + +echo $ac_n "checking if we may not define our own malloc()""... $ac_c" 1>&6 +echo "configure:17932: 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 < -/* 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() { +static int mcalled; +char * +malloc(s) + int s; +{ + extern char *sbrk(); -/* 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 + /* + * 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;{} + +main() +{ +#ifdef HAVE_STRDUP + strdup("aaa"); #else -$ac_func(); + exit(0); #endif + exit(1);} +EOF +if { (eval echo configure:17971: \"$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_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:17993: 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}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" +if { (eval echo configure:18012: \"$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_var_timezone=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + rm -fr conftest* + ac_cv_var_timezone=no fi -rm -f conftest* +rm -fr 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 +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 -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:14479: checking for raw availability of $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_rfunc_$ac_func'+set}'`\" = set"; then +fi +echo $ac_n "checking for extern timezone in time.h or sys/time.h""... $ac_c" 1>&6 +echo "configure:18034: 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() { - -$ac_func(); - +timezone = 1; ; return 0; } EOF -if { (eval echo configure:14497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_rfunc_$ac_func=yes" + ac_cv_var_timezone_def=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_rfunc_$ac_func=no" + ac_cv_var_timezone_def=no fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_rfunc_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_RAW_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 +if test $ac_cv_var_timezone_def = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_VAR_TIMEZONE_DEF 1 EOF - -else - echo "$ac_t""no" 1>&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:14524: checking for raw availability of $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_rfunc_$ac_func'+set}'`\" = set"; then +fi +echo $ac_n "checking for working extern char *__progname ""... $ac_c" 1>&6 +echo "configure:18077: 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}; then - rm -rf conftest* - eval "ac_cv_rfunc_$ac_func=yes" +if { (eval echo configure:18096: \"$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_var___progname=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_rfunc_$ac_func=no" + rm -fr conftest* + ac_cv_var___progname=no fi -rm -f conftest* +rm -fr conftest* fi -if eval "test \"`echo '$ac_cv_rfunc_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_RAW_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi -done +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 -for ac_func in getline fgetline -do -echo $ac_n "checking for raw availability of $ac_func""... $ac_c" 1>&6 -echo "configure:14570: checking for raw availability of $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_rfunc_$ac_func'+set}'`\" = set"; then +fi +echo $ac_n "checking for working extern char *__progname_full ""... $ac_c" 1>&6 +echo "configure:18118: 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}; then - rm -rf conftest* - eval "ac_cv_rfunc_$ac_func=yes" +if { (eval echo configure:18137: \"$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_var___progname_full=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_rfunc_$ac_func=no" + rm -fr conftest* + ac_cv_var___progname_full=no fi -rm -f conftest* +rm -fr conftest* fi -if eval "test \"`echo '$ac_cv_rfunc_'$ac_func`\" = yes"; then - 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. +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 -echo $ac_n "checking if dirfd is defined or function""... $ac_c" 1>&6 -echo "configure:14615: checking if dirfd is defined or function" >&5 -if eval "test \"`echo '$''{'ac_cv_have_dirfd'+set}'`\" = set"; then +fi + +echo $ac_n "checking if link() allows hard links on symlinks""... $ac_c" 1>&6 +echo "configure:18160: 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 < -int main() { -#ifndef dirfd - char *p = (char *) dirfd; -#endif -; return 0; } +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); +} EOF -if { (eval echo configure:14630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_have_dirfd=yes +if { (eval echo configure:18190: \"$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_hard_symlinks=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_dirfd=no + rm -fr conftest* + ac_cv_hard_symlinks=no fi -rm -f conftest* +rm -fr 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 +if test $ac_cv_hard_symlinks = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_HARD_SYMLINKS 1 EOF fi - -echo $ac_n "checking if iswprint is defined or function""... $ac_c" 1>&6 -echo "configure:14652: checking if iswprint is defined or function" >&5 -if eval "test \"`echo '$''{'ac_cv_have_iswprint'+set}'`\" = set"; then +echo $ac_n "checking if link() does not folow symlinks""... $ac_c" 1>&6 +echo "configure:18212: 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 < -#endif -#ifdef HAVE_WCTYPE_H -#include -#endif +#include +#include -int main() { +main() +{ + int ret = 0; + int f; + struct stat sb; -#ifndef iswprint - char *p = (char *) iswprint; -#endif -; return 0; } + 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:14674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_have_iswprint=yes +if { (eval echo configure:18254: \"$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 -rf conftest* - ac_cv_have_iswprint=no + rm -fr conftest* + ac_cv_link_nofollow=no fi -rm -f conftest* +rm -fr conftest* fi -echo "$ac_t""$ac_cv_have_iswprint" 1>&6 - ac_tr_dfunc=HAVE_`echo iswprint | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_iswprint = yes; then - cat >> confdefs.h <&6 +if test $ac_cv_link_nofollow = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LINK_NOFOLLOW 1 EOF fi - -echo $ac_n "checking if mbsinit is defined or function""... $ac_c" 1>&6 -echo "configure:14696: checking if mbsinit is defined or function" >&5 -if eval "test \"`echo '$''{'ac_cv_have_mbsinit'+set}'`\" = set"; then +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:18279: 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 < -#endif -#ifdef HAVE_WCTYPE_H -#include -#endif - -int main() { - -#ifndef mbsinit - char *p = (char *) mbsinit; -#endif -; return 0; } +#include <$ac_hdr> EOF -if { (eval echo configure:14718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:18289: \"$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_have_mbsinit=yes + 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* - ac_cv_have_mbsinit=no + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi - -echo "$ac_t""$ac_cv_have_mbsinit" 1>&6 - ac_tr_dfunc=HAVE_`echo mbsinit | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_mbsinit = yes; then +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 mbrtowc is defined or function""... $ac_c" 1>&6 -echo "configure:14740: checking if mbrtowc is defined or function" >&5 -if eval "test \"`echo '$''{'ac_cv_have_mbrtowc'+set}'`\" = set"; then +echo $ac_n "checking if access() does implement E_OK""... $ac_c" 1>&6 +echo "configure:18316: 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 < +# 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 -#ifdef HAVE_WCTYPE_H -#include #endif -int main() { +#include +#ifndef HAVE_ERRNO_DEF +extern int errno; +#endif -#ifndef mbrtowc - char *p = (char *) mbrtowc; +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 -; return 0; } + + exit(ret); +} EOF -if { (eval echo configure:14762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_have_mbrtowc=yes +if { (eval echo configure:18377: \"$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 -rf conftest* - ac_cv_have_mbrtowc=no + rm -fr conftest* + ac_cv_access_e_ok=no fi -rm -f conftest* +rm -fr conftest* fi -echo "$ac_t""$ac_cv_have_mbrtowc" 1>&6 - ac_tr_dfunc=HAVE_`echo mbrtowc | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_mbrtowc = yes; then - cat >> confdefs.h <&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 if wcrtomb is defined or function""... $ac_c" 1>&6 -echo "configure:14784: checking if wcrtomb is defined or function" >&5 -if eval "test \"`echo '$''{'ac_cv_have_wcrtomb'+set}'`\" = set"; then +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:18402: 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 < -#endif -#ifdef HAVE_WCTYPE_H -#include -#endif - -int main() { - -#ifndef wcrtomb - char *p = (char *) wcrtomb; -#endif -; return 0; } +#include <$ac_hdr> EOF -if { (eval echo configure:14806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:18412: \"$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_have_wcrtomb=yes + 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* - ac_cv_have_wcrtomb=no + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi - -echo "$ac_t""$ac_cv_have_wcrtomb" 1>&6 - ac_tr_dfunc=HAVE_`echo wcrtomb | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_wcrtomb = yes; then +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 finite is defined or function""... $ac_c" 1>&6 -echo "configure:14828: checking if finite is defined or function" >&5 -if eval "test \"`echo '$''{'ac_cv_have_finite'+set}'`\" = set"; then +echo $ac_n "checking if fnmatch() does implement FNM_IGNORECASE or FNM_CASEFOLD""... $ac_c" 1>&6 +echo "configure:18439: 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 < -int main() { -#ifndef finite - char *p = (char *) finite; +#ifdef HAVE_FNMATCH +#include #endif -; return 0; } + +#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:14843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_have_finite=yes +if { (eval echo configure:18468: \"$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 -rf conftest* - ac_cv_have_finite=no + rm -fr conftest* + ac_cv_fnmatch_igncase=no fi -rm -f conftest* +rm -fr conftest* fi -echo "$ac_t""$ac_cv_have_finite" 1>&6 - ac_tr_dfunc=HAVE_`echo finite | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_finite = yes; then - cat >> confdefs.h <&6 +if test $ac_cv_fnmatch_igncase = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_FNMATCH_IGNORECASE 1 EOF fi -echo $ac_n "checking if isnand is defined or function""... $ac_c" 1>&6 -echo "configure:14864: checking if isnand is defined or function" >&5 -if eval "test \"`echo '$''{'ac_cv_have_isnand'+set}'`\" = set"; then + +echo $ac_n "checking for fseeko()""... $ac_c" 1>&6 +echo "configure:18491: 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 < +#include int main() { - -#ifndef isnand - char *p = (char *) isnand; -#endif +return !fseeko; ; return 0; } EOF -if { (eval echo configure:14879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_have_isnand=yes + ac_cv_func_fseeko=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_have_isnand=no + ac_cv_func_fseeko=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_have_isnand" 1>&6 - ac_tr_dfunc=HAVE_`echo isnand | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_isnand = yes; then - cat >> confdefs.h <&6 +if test $ac_cv_func_fseeko = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_FSEEKO 1 EOF fi - -echo $ac_n "checking if we may not define our own malloc()""... $ac_c" 1>&6 -echo "configure:14901: 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 "checking for ftello()""... $ac_c" 1>&6 +echo "configure:18523: checking for ftello()" >&5 +if eval "test \"`echo '$''{'ac_cv_func_ftello'+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() { +return !ftello; +; return 0; } EOF -if { (eval echo configure:14940: \"$ac_link\") 1>&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 +if { (eval echo configure:18535: \"$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 -fr conftest* - ac_cv_no_user_malloc=yes -fi -rm -fr conftest* + rm -rf conftest* + ac_cv_func_ftello=no fi - +rm -f conftest* fi -echo "$ac_t""$ac_cv_no_user_malloc" 1>&6 -if test $ac_cv_no_user_malloc = yes; then +eval echo "$ac_t""$ac_cv_func_ftello" 1>&6 +if test $ac_cv_func_ftello = yes; then cat >> confdefs.h <<\EOF -#define NO_USER_MALLOC 1 +#define HAVE_FTELLO 1 EOF fi -echo $ac_n "checking for working extern long timezone ""... $ac_c" 1>&6 -echo "configure:14962: checking for working extern long timezone " >&5 -if eval "test \"`echo '$''{'ac_cv_var_timezone'+set}'`\" = set"; then + +echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 +echo "configure:18556: 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 - 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 < 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 +if { (eval echo configure:18575: \"$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 -fr conftest* - ac_cv_var_timezone=no -fi -rm -fr conftest* -fi - + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" 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 +rm -f conftest* +LIBS="$ac_save_LIBS" fi -echo $ac_n "checking for extern timezone in time.h or sys/time.h""... $ac_c" 1>&6 -echo "configure:15003: checking for extern timezone in time.h or sys/time.h" >&5 -if eval "test \"`echo '$''{'ac_cv_var_timezone_def'+set}'`\" = set"; then +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:18594: 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 - cat > conftest.$ac_ext < 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; +dlopen() ; return 0; } EOF -if { (eval echo configure:15026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_var_timezone_def=yes + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_var_timezone_def=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* -fi +LIBS="$ac_save_LIBS" -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 +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 -echo $ac_n "checking if link() allows hard links on symlinks""... $ac_c" 1>&6 -echo "configure:15047: checking if link() allows hard links on symlinks" >&5 -if eval "test \"`echo '$''{'ac_cv_hard_symlinks'+set}'`\" = set"; then +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:18640: 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 - 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 < +/* 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(); -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; +int main() { - unlink("confdefs.l1"); - unlink("confdefs.h1"); +/* 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 - exit(ret); -} +; return 0; } EOF -if { (eval echo configure:15077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_hard_symlinks=yes +if { (eval echo configure:18668: \"$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 -fr conftest* - ac_cv_hard_symlinks=no -fi -rm -fr conftest* + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi - +rm -f conftest* 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 +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 -echo $ac_n "checking if link() does not folow symlinks""... $ac_c" 1>&6 -echo "configure:15099: checking if link() does not folow symlinks" >&5 -if eval "test \"`echo '$''{'ac_cv_link_nofollow'+set}'`\" = set"; then +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:18695: 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 - 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 < +/* 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(); -#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; +int main() { - unlink("confdefs.f1"); - unlink("confdefs.l1"); - unlink("confdefs.h1"); +/* 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 - exit(ret); -} +; return 0; } EOF -if { (eval echo configure:15141: \"$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 +if { (eval echo configure:18723: \"$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 -fr conftest* - ac_cv_link_nofollow=no + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi -rm -fr conftest* +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_t""$ac_cv_link_nofollow" 1>&6 -if test $ac_cv_link_nofollow = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_LINK_NOFOLLOW 1 +LIBS="$ac_save_LIBS" +if test ."$lib_dl" = .""; then + cat >> confdefs.h <<\EOF +#define HAVE_DLOPEN_IN_LIBC 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:15166: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + +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:18758: 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 < + +#ifdef HAVE_WINDOWS_H +#undef u_char +#undef u_short +#undef u_int +#undef u_long +#include +#endif + +int main() { + +#ifndef $ac_func + char *p = (char *) $ac_func; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:15176: \"$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 +if { (eval echo configure:18782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval ac_cv_have_$ac_func=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" + eval ac_cv_have_$ac_func=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___%'` + +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 + fi done -echo $ac_n "checking if access() does implement E_OK""... $ac_c" 1>&6 -echo "configure:15203: checking if access() does implement E_OK" >&5 -if eval "test \"`echo '$''{'ac_cv_access_e_ok'+set}'`\" = set"; then + +echo $ac_n "checking for rcmd in -lsocket""... $ac_c" 1>&6 +echo "configure:18806: 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 - 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 < 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); -} +int main() { +rcmd() +; return 0; } EOF -if { (eval echo configure:15264: \"$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 +if { (eval echo configure:18825: \"$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 -fr conftest* - ac_cv_access_e_ok=no -fi -rm -fr conftest* + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi +rm -f conftest* +LIBS="$ac_save_LIBS" 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 - +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 -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:15289: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_socket" +echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 +echo "configure:18848: 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 - cat > conftest.$ac_ext < 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 inet_ntoa(); + +int main() { +inet_ntoa() +; return 0; } EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:15299: \"$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 +if { (eval echo configure:18867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "ac_cv_lib_$ac_lib_var=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" + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* +LIBS="$ac_save_LIBS" + 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 + lib_nsl="-lnsl" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 fi -done -echo $ac_n "checking if fnmatch() does implement FNM_IGNORECASE or FNM_CASEFOLD""... $ac_c" 1>&6 -echo "configure:15326: checking if fnmatch() does implement FNM_IGNORECASE or FNM_CASEFOLD" >&5 -if eval "test \"`echo '$''{'ac_cv_fnmatch_igncase'+set}'`\" = set"; then +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:18891: 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 - 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 < +/* 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(); -#ifdef HAVE_FNMATCH -#include -#endif +int main() { -#ifndef FNM_IGNORECASE -#ifdef FNM_CASEFOLD -#define FNM_IGNORECASE FNM_CASEFOLD -#endif +/* 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 -main() -{ - int ret; - - ret = fnmatch("a", "A", FNM_IGNORECASE); - exit(ret); -} +; return 0; } EOF -if { (eval echo configure:15355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_fnmatch_igncase=yes +if { (eval echo configure:18919: \"$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 -fr conftest* - ac_cv_fnmatch_igncase=no -fi -rm -fr conftest* + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi - +rm -f conftest* fi -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 +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 fseeko()""... $ac_c" 1>&6 -echo "configure:15378: checking for fseeko()" >&5 -if eval "test \"`echo '$''{'ac_cv_func_fseeko'+set}'`\" = set"; then +for ac_func in getservbyname inet_ntoa +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18946: 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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() { -return !fseeko; + +/* 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:15390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_func_fseeko=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_func_fseeko=no + eval "ac_cv_func_$ac_func=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 - +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 -echo $ac_n "checking for ftello()""... $ac_c" 1>&6 -echo "configure:15410: checking for ftello()" >&5 -if eval "test \"`echo '$''{'ac_cv_func_ftello'+set}'`\" = set"; then +done + +for ac_func in getaddrinfo getnameinfo +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:19001: 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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() { -return !ftello; + +/* 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 +if { (eval echo configure:19029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_func_ftello=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_func_ftello=no + eval "ac_cv_func_$ac_func=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 +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 dlopen in -lc""... $ac_c" 1>&6 -echo "configure:15443: checking for dlopen in -lc" >&5 -ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'` +LIBS="$ac_save_LIBS" + +ac_save_LIBS="$LIBS" +echo $ac_n "checking for res_init in -lc""... $ac_c" 1>&6 +echo "configure:19057: 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 +if { (eval echo configure:19076: \"$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 @@ -15472,31 +19086,31 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_dl="" + eval echo "$ac_t""yes" 1>&6 + lib_resolv="" else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:15481: checking for dlopen in -ldl" >&5 -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for res_init in -lresolv""... $ac_c" 1>&6 +echo "configure:19095: 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 "-ldl $LIBS" | sed -e 's/-lc //'` +LIBS=`echo "-lresolv $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:19114: \"$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 @@ -15510,385 +19124,453 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_dl="-ldl" + eval echo "$ac_t""yes" 1>&6 + lib_resolv="-lresolv" else - echo "$ac_t""no" 1>&6 + 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 -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15527: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +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:19153: 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 - cat > conftest.$ac_ext < 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(); - +#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]; + 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:19179: \"$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:15555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + ac_cv_sys_largefile_CC=' -n32' 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* + CC="$ac_save_CC" +fi +rm -f conftest* + fi 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 + 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:19225: 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:19247: \"$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:19272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_sys_file_offset_bits=64 else - echo "$ac_t""no" 1>&6 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +fi +rm -f conftest* 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:15582: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +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:19292: 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:19314: \"$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 < -/* 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(); - +#define _LARGE_FILES 1 +#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]; + + 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:15610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + ac_cv_sys_large_files=1 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 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 + if test "$ac_cv_sys_large_files" != no; then + cat >> confdefs.h <&6 -fi -done -for ac_func in LoadLibrary FreeLibrary GetProcAddress -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15637: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + fi + echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6 +echo "configure:19359: 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 - cat > conftest.$ac_ext < 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(); - +#include 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 !fseeko; ; return 0; } EOF -if { (eval echo configure:15665: \"$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" +if { (eval echo configure:19372: \"$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* - 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 rcmd in -lsocket""... $ac_c" 1>&6 -echo "configure:15692: 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=`echo "-lsocket $LIBS" | sed -e 's/-lc //'` -cat > conftest.$ac_ext < conftest.$ac_ext < + int main() { -rcmd() +return !fseeko; ; return 0; } EOF -if { (eval echo configure:15711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ac_cv_sys_largefile_source=1 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 +rm -f conftest* fi -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_socket" -echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 -echo "configure:15734: 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 +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:19410: 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 - ac_save_LIBS="$LIBS" -LIBS=`echo "-lnsl $LIBS" | sed -e 's/-lc //'` -cat > conftest.$ac_ext < conftest.$ac_ext < +#include int main() { -inet_ntoa() + +/* + * 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:15753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + ac_cv_largefiles=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + ac_cv_largefiles=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:15777: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +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:19478: 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 - cat > conftest.$ac_ext < 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(); +char crypt(); 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 - +crypt() ; return 0; } EOF -if { (eval echo configure:15805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19497: \"$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" + 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_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 + eval "ac_cv_lib_$ac_lib_var=no" fi -done +rm -f conftest* +LIBS="$ac_save_LIBS" -for ac_func in getservbyname inet_ntoa -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15832: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +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:19516: 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 - cat > conftest.$ac_ext < 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(); +char crypt(); 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 - +crypt() ; return 0; } EOF -if { (eval echo configure:15860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19535: \"$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" + 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_func_$ac_func=no" + 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 -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 <> confdefs.h <<\EOF +#define HAVE_CRYPT_IN_LIBC 1 EOF - -else - echo "$ac_t""no" 1>&6 + fi -done -for ac_func in getaddrinfo getnameinfo +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:15887: checking for $ac_func" >&5 +echo "configure:19569: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19597: \"$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 @@ -15924,41 +19606,40 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&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:15943: checking for res_init in -lc" >&5 -ac_lib_var=`echo c'_'res_init | sed 'y%./+-%__p_%'` +echo $ac_n "checking for gettext in -lc""... $ac_c" 1>&6 +echo "configure:19624: 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=`echo "-lc $LIBS" | sed -e 's/-lc //'` +LIBS="-lc $LIBS" cat > conftest.$ac_ext < int main() { -res_init() + + char *p = (char *) gettext; + + return ((int)p); + ; return 0; } EOF -if { (eval echo configure:15962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19643: \"$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 @@ -15972,31 +19653,31 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_resolv="" + eval echo "$ac_t""yes" 1>&6 + lib_intl="" else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for res_init in -lresolv""... $ac_c" 1>&6 -echo "configure:15981: checking for res_init in -lresolv" >&5 -ac_lib_var=`echo resolv'_'res_init | sed 'y%./+-%__p_%'` + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 +echo "configure:19662: 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=`echo "-lresolv $LIBS" | sed -e 's/-lc //'` +LIBS="-lintl $LIBS" cat > conftest.$ac_ext < int main() { -res_init() + + char *p = (char *) gettext; + + return ((int)p); + ; return 0; } EOF -if { (eval echo configure:16000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19681: \"$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 @@ -16010,370 +19691,403 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_resolv="-lresolv" + eval echo "$ac_t""yes" 1>&6 + lib_intl="-lintl" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 fi fi -LIBS="$ac_save_LIBS" +if test ."$lib_intl" = .""; then + cat >> confdefs.h <<\EOF +#define HAVE_GETTEXT_IN_LIBC 1 +EOF -# 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:16033: checking for special C compiler options needed for large files" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_largefile_CC'+set}'`\" = set"; then +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_intl" +echo $ac_n "checking if gettext is defined or function""... $ac_c" 1>&6 +echo "configure:19713: 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 - 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 < 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]; - +#include int main() { +#ifndef gettext + char *p = (char *) gettext; + exit (p != (char *)0 && *p != 0); +#endif ; return 0; } EOF -if { (eval echo configure:16059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - : +if { (eval echo configure:19729: \"$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* - ac_save_CC="${CC-cc}" - CC="$CC -n32" - cat > conftest.$ac_ext <&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:19753: 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 < - /* 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]; - +#include int main() { + char *p = (char *) iconv_open; + + return ((int)p); + ; return 0; } EOF -if { (eval echo configure:16084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_sys_largefile_CC=' -n32' + 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* - 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 +LIBS="$ac_save_LIBS" - echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6 -echo "configure:16105: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then +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:19791: 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_cv_sys_file_offset_bits=no - cat > conftest.$ac_ext < 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]; - +#include int main() { + char *p = (char *) iconv_open; + + return ((int)p); + ; return 0; } EOF -if { (eval echo configure:16127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - : +if { (eval echo configure:19810: \"$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* - 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]; - - + 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:19842: 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:16152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_sys_file_offset_bits=64 + eval ac_cv_have_iconv=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 -fi -rm -f conftest* + rm -rf conftest* + eval ac_cv_have_iconv=no 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 + 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:16172: checking for _LARGE_FILES value needed for large files" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then +fi + +echo $ac_n "checking if iconv_open is defined or function""... $ac_c" 1>&6 +echo "configure:19880: 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 - ac_cv_sys_large_files=no - cat > conftest.$ac_ext < 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]; - +#include int main() { +#ifndef iconv_open + char *p = (char *) iconv_open; + exit (p != (char *)0 && *p != 0); +#endif ; return 0; } EOF -if { (eval echo configure:16194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - : +if { (eval echo configure:19896: \"$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:19918: 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 < - /* 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]; - - +#include int main() { +#ifndef iconv_close + char *p = (char *) iconv_close; + exit (p != (char *)0 && *p != 0); +#endif ; return 0; } EOF -if { (eval echo configure:16219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_sys_large_files=1 + eval ac_cv_have_iconv_close=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 -fi -rm -f conftest* + rm -rf conftest* + eval ac_cv_have_iconv_close=no 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 + 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:16239: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then +fi + +echo $ac_n "checking if libiconv is defined or function""... $ac_c" 1>&6 +echo "configure:19956: 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 - ac_cv_sys_largefile_source=no - cat > conftest.$ac_ext < conftest.$ac_ext < +#include int main() { -return !fseeko; + +#ifndef libiconv + char *p = (char *) libiconv; + exit (p != (char *)0 && *p != 0); +#endif ; return 0; } EOF -if { (eval echo configure:16252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - : +if { (eval echo configure:19972: \"$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:19994: 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 < - +#include int main() { -return !fseeko; + +#ifndef libiconv_open + char *p = (char *) libiconv_open; + exit (p != (char *)0 && *p != 0); +#endif ; return 0; } EOF -if { (eval echo configure:16268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:20010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_sys_largefile_source=1 + eval ac_cv_have_libiconv_open=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 -fi -rm -f conftest* + rm -rf conftest* + eval ac_cv_have_libiconv_open=no 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 + 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:16290: checking if system supports Large Files at all" >&5 -if eval "test \"`echo '$''{'ac_cv_largefiles'+set}'`\" = set"; then +fi + +echo $ac_n "checking if libiconv_close is defined or function""... $ac_c" 1>&6 +echo "configure:20032: 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 < -#include +#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; +#ifndef libiconv_close + char *p = (char *) libiconv_close; + exit (p != (char *)0 && *p != 0); +#endif ; return 0; } EOF -if { (eval echo configure:16315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:20048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_largefiles=yes + eval ac_cv_have_libiconv_close=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_largefiles=no + eval ac_cv_have_libiconv_close=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 + 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:16358: checking for crypt in -lc" >&5 -ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'` +echo $ac_n "checking for XML_Parse in -lc""... $ac_c" 1>&6 +echo "configure:20072: 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 +if { (eval echo configure:20091: \"$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 @@ -16387,31 +20101,31 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_crypt="" + eval echo "$ac_t""yes" 1>&6 + lib_expat="" else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:16396: checking for crypt in -lcrypt" >&5 -ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for XML_Parse in -lexpat""... $ac_c" 1>&6 +echo "configure:20110: 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 "-lcrypt $LIBS" | sed -e 's/-lc //'` +LIBS=`echo "-lexpat $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:20129: \"$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 @@ -16425,26 +20139,31 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_crypt="-lcrypt" + eval echo "$ac_t""yes" 1>&6 + lib_expat="-lexpat" else - echo "$ac_t""no" 1>&6 + 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_crypt" -for ac_func in crypt +LIBS="$LIBS $lib_expat" +for ac_func in XML_Parse do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16443: checking for $ac_func" >&5 +echo "configure:20162: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20190: \"$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 @@ -16480,40 +20199,87 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done LIBS="$ac_save_LIBS" -echo $ac_n "checking for gettext in -lc""... $ac_c" 1>&6 -echo "configure:16498: checking for gettext in -lc" >&5 -ac_lib_var=`echo c'_'gettext | sed 'y%./+-%__p_%'` +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:20226: 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="-lc $LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` cat > conftest.$ac_ext < -int main() { +/* 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 SCardEstablishContext(); - char *p = (char *) gettext; +int main() { +SCardEstablishContext() +; return 0; } +EOF +if { (eval echo configure:20245: \"$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" - return ((int)p); +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:20264: 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 +if { (eval echo configure:20283: \"$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 @@ -16527,31 +20293,31 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_intl="" + eval echo "$ac_t""yes" 1>&6 + lib_pcsc="-lwinscard" else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 -echo "configure:16536: checking for gettext in -lintl" >&5 -ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for SCardEstablishContext in -lpcsclite""... $ac_c" 1>&6 +echo "configure:20302: 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="-lintl $LIBS" +LIBS=`echo "-lpcsclite $LIBS" | sed -e 's/-lc //'` cat > conftest.$ac_ext < -int main() { - - char *p = (char *) gettext; - - return ((int)p); +/* 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 SCardEstablishContext(); +int main() { +SCardEstablishContext() ; return 0; } EOF -if { (eval echo configure:16555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20321: \"$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 @@ -16565,76 +20331,110 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_intl="-lintl" + eval echo "$ac_t""yes" 1>&6 + lib_pcsc="-lpcsclite" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 fi fi +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:16581: checking if gettext is defined or function" >&5 -if eval "test \"`echo '$''{'ac_cv_have_gettext'+set}'`\" = set"; then + 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:20356: 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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() { -#ifndef gettext - char *p = (char *) gettext; +/* 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:16596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_have_gettext=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_have_gettext=no + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_have_gettext" 1>&6 - ac_tr_dfunc=HAVE_`echo gettext | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_gettext = yes; then +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 -LIBS="$ac_save_LIBS" -echo $ac_n "checking for iconv_open in -lc""... $ac_c" 1>&6 -echo "configure:16619: checking for iconv_open in -lc" >&5 -ac_lib_var=`echo c'_'iconv_open | sed 'y%./+-%__p_%'` +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:20419: 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="-lc $LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` cat > conftest.$ac_ext < -int main() { - - char *p = (char *) iconv_open; - - return ((int)p); +/* 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 CRYPTO_free(); +int main() { +CRYPTO_free() ; return 0; } EOF -if { (eval echo configure:16638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20438: \"$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 @@ -16648,31 +20448,31 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_iconv="" + eval echo "$ac_t""yes" 1>&6 + lib_crypto="" else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6 -echo "configure:16657: checking for iconv_open in -liconv" >&5 -ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'` + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6 +echo "configure:20457: 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="-liconv $LIBS" +LIBS=`echo "-lcrypto $LIBS" | sed -e 's/-lc //'` cat > conftest.$ac_ext < -int main() { - - char *p = (char *) iconv_open; - - return ((int)p); +/* 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 CRYPTO_free(); +int main() { +CRYPTO_free() ; return 0; } EOF -if { (eval echo configure:16676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20476: \"$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 @@ -16686,234 +20486,223 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_iconv="-liconv" + eval echo "$ac_t""yes" 1>&6 + lib_crypto="-lcrypto" else - echo "$ac_t""no" 1>&6 + 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 -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_iconv" -echo $ac_n "checking if iconv is defined or function""... $ac_c" 1>&6 -echo "configure:16702: checking if iconv is defined or function" >&5 -if eval "test \"`echo '$''{'ac_cv_have_iconv'+set}'`\" = set"; then + 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:20509: 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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() { -#ifndef iconv - char *p = (char *) iconv; +/* 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:16717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_have_iconv=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_have_iconv=no + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_have_iconv" 1>&6 - ac_tr_dfunc=HAVE_`echo iconv | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_iconv = yes; then +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 -echo "configure:16738: 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; -#endif -; return 0; } +#define $ac_tr_func 1 EOF -if { (eval echo configure:16753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_have_iconv_open=yes + else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_iconv_open=no -fi -rm -f conftest* + eval echo "$ac_t""no" 1>&6 fi +done -echo "$ac_t""$ac_cv_have_iconv_open" 1>&6 - ac_tr_dfunc=HAVE_`echo iconv_open | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_iconv_open = yes; then - cat >> confdefs.h <&6 -echo "configure:16774: checking if iconv_close is defined or function" >&5 -if eval "test \"`echo '$''{'ac_cv_have_iconv_close'+set}'`\" = set"; then + LIBS="$ac_save_LIBS" + echo $ac_n "checking for SSL_free in -lc""... $ac_c" 1>&6 +echo "configure:20563: 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 - cat > conftest.$ac_ext < conftest.$ac_ext < -int main() { +/* 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 SSL_free(); -#ifndef iconv_close - char *p = (char *) iconv_close; -#endif +int main() { +SSL_free() ; return 0; } EOF -if { (eval echo configure:16789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_have_iconv_close=yes + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_have_iconv_close=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* -fi - -echo "$ac_t""$ac_cv_have_iconv_close" 1>&6 - ac_tr_dfunc=HAVE_`echo iconv_close | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_iconv_close = yes; then - cat >> confdefs.h <&6 -echo "configure:16810: checking if libiconv is defined or function" >&5 -if eval "test \"`echo '$''{'ac_cv_have_libiconv'+set}'`\" = set"; then +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:20601: 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 - cat > conftest.$ac_ext < conftest.$ac_ext < -int main() { +/* 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 SSL_free(); -#ifndef libiconv - char *p = (char *) libiconv; -#endif +int main() { +SSL_free() ; return 0; } EOF -if { (eval echo configure:16825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_have_libiconv=yes + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_have_libiconv=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* -fi - -echo "$ac_t""$ac_cv_have_libiconv" 1>&6 - ac_tr_dfunc=HAVE_`echo libiconv | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_libiconv = yes; then - cat >> confdefs.h <&6 -echo "configure:16846: 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; -#endif -; return 0; } -EOF -if { (eval echo configure:16861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_have_libiconv_open=yes +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_ssl="-lssl" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_libiconv_open=no + eval echo "$ac_t""no" 1>&6 fi -rm -f conftest* + fi -echo "$ac_t""$ac_cv_have_libiconv_open" 1>&6 - ac_tr_dfunc=HAVE_`echo libiconv_open | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_libiconv_open = yes; then - cat >> confdefs.h <> confdefs.h <<\EOF +#define HAVE_SSL_IN_LIBC 1 EOF -fi -echo $ac_n "checking if libiconv_close is defined or function""... $ac_c" 1>&6 -echo "configure:16882: checking if libiconv_close is defined or function" >&5 -if eval "test \"`echo '$''{'ac_cv_have_libiconv_close'+set}'`\" = set"; then + 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:20653: 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 < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* 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() { -#ifndef libiconv_close - char *p = (char *) libiconv_close; +/* 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:16897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_have_libiconv_close=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_have_libiconv_close=no + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_have_libiconv_close" 1>&6 - ac_tr_dfunc=HAVE_`echo libiconv_close | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_libiconv_close = yes; then +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 -LIBS="$ac_save_LIBS" if test $ac_cv_header_camlib_h = yes; then scsi_lib=-lcam @@ -16923,9 +20712,9 @@ if test "$ac_cv_header_sys_acl_h" = yes; then echo "checking for Posix Access Control List support" 1>&6 -echo "configure:16927: checking for Posix Access Control List support" >&5 +echo "configure:20716: checking for Posix Access Control List support" >&5 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:16929: checking for acl_get_file in -lacl" >&5 +echo "configure:20718: 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 @@ -16933,7 +20722,7 @@ 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 +if { (eval echo configure:20737: \"$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 @@ -16958,14 +20747,14 @@ 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 lib_acl="-lacl" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for acl_get_file in -lpacl""... $ac_c" 1>&6 -echo "configure:16969: checking for acl_get_file in -lpacl" >&5 +echo "configure:20758: 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 @@ -16973,7 +20762,7 @@ 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 +if { (eval echo configure:20777: \"$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 @@ -16998,10 +20787,10 @@ 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 lib_acl="-lpacl" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 fi @@ -17015,12 +20804,12 @@ 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:17019: checking for $ac_func" >&5 +echo "configure:20808: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20836: \"$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 @@ -17056,26 +20845,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done for ac_func in acl_extended_file do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17074: checking for $ac_func" >&5 +echo "configure:20863: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20891: \"$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 @@ -17111,26 +20900,81 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done for ac_func in acl_get_entry do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17129: checking for $ac_func" >&5 +echo "configure:20918: 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:20946: \"$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:20973: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21001: \"$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 @@ -17166,23 +21010,23 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done LIBS="$ac_save_LIBS" - echo "checking for Solaris Access Control List support" 1>&6 -echo "configure:17184: checking for Solaris Access Control List support" >&5 + echo "checking for Solaris UFS Access Control List support" 1>&6 +echo "configure:21028: checking for Solaris UFS Access Control List support" >&5 echo $ac_n "checking for acltotext in -lsec""... $ac_c" 1>&6 -echo "configure:17186: checking for acltotext in -lsec" >&5 +echo "configure:21030: 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 @@ -17190,7 +21034,7 @@ 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 +if { (eval echo configure:21049: \"$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 @@ -17215,10 +21059,10 @@ 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 lib_acl="-lsec" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 fi ac_save_LIBS="$LIBS" @@ -17226,12 +21070,70 @@ for ac_func in acl facl aclfromtext acltotext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17230: checking for $ac_func" >&5 +echo "configure:21074: 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:21102: \"$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:21128: 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:21132: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21160: \"$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 @@ -17267,14 +21169,14 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done @@ -17282,16 +21184,16 @@ echo "checking for HP-UX Access Control List support" 1>&6 -echo "configure:17286: checking for HP-UX Access Control List support" >&5 +echo "configure:21188: 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:17290: checking for $ac_func" >&5 +echo "configure:21192: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21220: \"$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 @@ -17327,14 +21229,14 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done @@ -17344,9 +21246,9 @@ if test "$ac_cv_header_attr_xattr_h" = yes; then echo "checking for Linux flavor Extended Attribute support" 1>&6 -echo "configure:17348: checking for Linux flavor Extended Attribute support" >&5 +echo "configure:21250: checking for Linux flavor Extended Attribute support" >&5 echo $ac_n "checking for getxattr in -lattr""... $ac_c" 1>&6 -echo "configure:17350: checking for getxattr in -lattr" >&5 +echo "configure:21252: 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 @@ -17354,7 +21256,7 @@ 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 +if { (eval echo configure:21271: \"$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 @@ -17379,10 +21281,10 @@ 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 lib_attr="-lattr" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 fi ac_save_LIBS="$LIBS" @@ -17390,12 +21292,12 @@ for ac_func in getxattr setxattr listxattr lgetxattr lsetxattr llistxattr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17394: checking for $ac_func" >&5 +echo "configure:21296: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21324: \"$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 @@ -17431,14 +21333,14 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done @@ -17446,9 +21348,9 @@ fi echo "checking for RBAC support" 1>&6 -echo "configure:17450: checking for RBAC support" >&5 +echo "configure:21352: checking for RBAC support" >&5 echo $ac_n "checking for getuserattr in -lsecdb""... $ac_c" 1>&6 -echo "configure:17452: checking for getuserattr in -lsecdb" >&5 +echo "configure:21354: 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 @@ -17456,7 +21358,7 @@ 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 +if { (eval echo configure:21373: \"$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 @@ -17481,10 +21383,10 @@ 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 lib_secdb="-lsecdb" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 fi ac_save_LIBS="$LIBS" @@ -17492,12 +21394,12 @@ for ac_func in getauthattr getuserattr getexecattr getprofattr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17496: checking for $ac_func" >&5 +echo "configure:21398: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21426: \"$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 @@ -17533,23 +21435,23 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done LIBS="$ac_save_LIBS" echo "checking for gmatch() support" 1>&6 -echo "configure:17551: checking for gmatch() support" >&5 +echo "configure:21453: checking for gmatch() support" >&5 echo $ac_n "checking for gmatch in -lgen""... $ac_c" 1>&6 -echo "configure:17553: checking for gmatch in -lgen" >&5 +echo "configure:21455: 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 @@ -17557,7 +21459,7 @@ 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 +if { (eval echo configure:21474: \"$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 @@ -17582,10 +21484,10 @@ 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 lib_gen="-lgen" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 fi ac_save_LIBS="$LIBS" @@ -17593,12 +21495,12 @@ for ac_func in gmatch do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17597: checking for $ac_func" >&5 +echo "configure:21499: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21527: \"$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 @@ -17634,14 +21536,14 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done @@ -17650,12 +21552,12 @@ for ac_func in thr_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17654: checking for $ac_func" >&5 +echo "configure:21556: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21584: \"$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 @@ -17691,20 +21593,20 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:17708: checking for pthread_create in -lpthread" >&5 +echo "configure:21610: 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 @@ -17712,7 +21614,7 @@ 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 +if { (eval echo configure:21629: \"$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 @@ -17737,12 +21639,12 @@ 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 lib_pthread="-lpthread" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:17746: checking for pthread_create in -lc" >&5 +echo "configure:21648: 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 @@ -17750,7 +21652,7 @@ 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 +if { (eval echo configure:21667: \"$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 @@ -17775,10 +21677,10 @@ 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 lib_pthread="" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 fi fi @@ -17789,12 +21691,12 @@ for ac_func in pthread_create pthread_kill do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17793: checking for $ac_func" >&5 +echo "configure:21695: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21723: \"$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 @@ -17830,26 +21732,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&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:17848: checking for $ac_func" >&5 +echo "configure:21750: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21778: \"$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 @@ -17885,21 +21787,21 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done LIBS="$ac_save_LIBS" echo $ac_n "checking for clock_gettime in -lc""... $ac_c" 1>&6 -echo "configure:17903: checking for clock_gettime in -lc" >&5 +echo "configure:21805: 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 @@ -17907,7 +21809,7 @@ 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 +if { (eval echo configure:21824: \"$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 @@ -17932,12 +21834,12 @@ 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 lib_rt="" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 echo $ac_n "checking for clock_gettime in -lrt""... $ac_c" 1>&6 -echo "configure:17941: checking for clock_gettime in -lrt" >&5 +echo "configure:21843: 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 @@ -17945,7 +21847,7 @@ 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 +if { (eval echo configure:21862: \"$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 @@ -17970,12 +21872,12 @@ 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 lib_rt="-lrt" else - echo "$ac_t""no" 1>&6 + eval echo "$ac_t""no" 1>&6 echo $ac_n "checking for clock_gettime in -lposix4""... $ac_c" 1>&6 -echo "configure:17979: checking for clock_gettime in -lposix4" >&5 +echo "configure:21881: 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 @@ -17983,7 +21885,7 @@ 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 +if { (eval echo configure:21900: \"$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 @@ -18008,28 +21910,34 @@ 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 lib_rt="-lposix4" else - echo "$ac_t""no" 1>&6 + 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:18028: checking for $ac_func" >&5 +echo "configure:21936: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:21964: \"$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 @@ -18065,26 +21973,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&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:18083: checking for $ac_func" >&5 +echo "configure:21991: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:22019: \"$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 @@ -18120,26 +22028,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done for ac_func in sched_yield do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:18138: checking for $ac_func" >&5 +echo "configure:22046: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:22074: \"$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 @@ -18175,26 +22083,26 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done for ac_func in nanosleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:18193: checking for $ac_func" >&5 +echo "configure:22101: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:22129: \"$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 @@ -18230,52 +22138,246 @@ fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done LIBS="$ac_save_LIBS" -echo $ac_n "checking for /dev/tty""... $ac_c" 1>&6 -echo "configure:18248: checking for /dev/tty" >&5 -if test -r /dev/tty; then - echo yes - cat >> confdefs.h <<\EOF -#define HAVE_DEV_TTY 1 +echo $ac_n "checking for cap_get_proc in -lcap""... $ac_c" 1>&6 +echo "configure:22156: 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:22200: 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:22228: \"$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 -echo $ac_n "checking for /dev/null""... $ac_c" 1>&6 -echo "configure:18259: checking for /dev/null" >&5 -if test -r /dev/null; then - echo yes - cat >> confdefs.h <<\EOF -#define HAVE_DEV_NULL 1 +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:22259: 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: Cannot check for file existence when cross compiling" 1>&2; exit 1; } +else + if $rmttest -r $ac_file; then + eval "ac_cv_file_$ac_safe=yes" + else + eval "ac_cv_file_$ac_safe=no" + fi +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:22291: 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: Cannot check for file existence when cross compiling" 1>&2; exit 1; } +else + if $rmttest -r $ac_file; then + eval "ac_cv_file_$ac_safe=yes" + else + eval "ac_cv_file_$ac_safe=no" + fi +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 -echo $ac_n "checking for /dev/zero""... $ac_c" 1>&6 -echo "configure:18270: checking for /dev/zero" >&5 -if test -r /dev/zero; then - echo yes - cat >> confdefs.h <<\EOF -#define HAVE_DEV_ZERO 1 +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:22323: 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: Cannot check for file existence when cross compiling" 1>&2; exit 1; } +else + if $rmttest -r $ac_file; then + eval "ac_cv_file_$ac_safe=yes" + else + eval "ac_cv_file_$ac_safe=no" + fi +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 +do +ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_file""... $ac_c" 1>&6 +echo "configure:22355: 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: Cannot check for file existence when cross compiling" 1>&2; exit 1; } +else + if $rmttest -r $ac_file; then + eval "ac_cv_file_$ac_safe=yes" + else + eval "ac_cv_file_$ac_safe=no" + fi +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` @@ -18283,12 +22385,12 @@ echo $ac_n "checking if Linux include file linux/ext2_fs.h is broken""... $ac_c" 1>&6 -echo "configure:18287: checking if Linux include file linux/ext2_fs.h is broken" >&5 +echo "configure:22389: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:22404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_broken_linux_ext2_fs_h=no else @@ -18310,7 +22412,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_broken_linux_ext2_fs_h" 1>&6 +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 @@ -18318,13 +22420,13 @@ 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:18322: checking if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken" >&5 +echo "configure:22424: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:22440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_broken_src_linux_ext2_fs_h=no else @@ -18346,7 +22448,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_broken_src_linux_ext2_fs_h" 1>&6 +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 @@ -18372,12 +22474,12 @@ 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:18376: checking if Linux include file scsi/scsi.h is broken" >&5 +echo "configure:22478: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:22493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_broken_scsi_scsi_h=no else @@ -18399,7 +22501,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_broken_scsi_scsi_h" 1>&6 +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 @@ -18407,13 +22509,13 @@ fi echo $ac_n "checking if Linux include file /usr/src/linux/include/scsi/scsi.h is broken""... $ac_c" 1>&6 -echo "configure:18411: checking if Linux include file /usr/src/linux/include/scsi/scsi.h is broken" >&5 +echo "configure:22513: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:22529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_broken_src_scsi_scsi_h=no else @@ -18435,7 +22537,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_broken_src_scsi_scsi_h" 1>&6 +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 @@ -18444,12 +22546,12 @@ fi echo $ac_n "checking if Linux include file scsi/sg.h is broken""... $ac_c" 1>&6 -echo "configure:18448: checking if Linux include file scsi/sg.h is broken" >&5 +echo "configure:22550: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:22566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_broken_scsi_sg_h=no else @@ -18472,7 +22574,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_broken_scsi_sg_h" 1>&6 +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 @@ -18480,13 +22582,13 @@ fi echo $ac_n "checking if Linux include file /usr/src/linux/include/scsi/sg.h is broken""... $ac_c" 1>&6 -echo "configure:18484: checking if Linux include file /usr/src/linux/include/scsi/sg.h is broken" >&5 +echo "configure:22586: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:22603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_broken_src_scsi_sg_h=no else @@ -18509,7 +22611,7 @@ rm -f conftest* fi -echo "$ac_t""$ac_cv_broken_src_scsi_sg_h" 1>&6 +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 @@ -18524,6 +22626,7 @@ 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 ***" @@ -18531,6 +22634,8 @@ 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 ***" @@ -18539,6 +22644,7 @@ echo sleep 10 fi +fi # was missing fi # Linux only tests @@ -18565,6 +22671,11 @@ + + + + + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -18655,7 +22766,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.15-Schily" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -18702,12 +22813,16 @@ 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%@LIBOBJS@%$LIBOBJS%g s%@ALLOCA@%$ALLOCA%g s%@may_linux_src_include@%$may_linux_src_include%g @@ -18720,6 +22835,10 @@ 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%@scsi_lib@%$scsi_lib%g s%@lib_scsi@%$lib_scsi%g s%@lib_acl@%$lib_acl%g @@ -18731,6 +22850,7 @@ 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 diff -Nru cdrtools-3.00~trusty~mc3man1/autoconf/configure.in cdrtools-3.01a26~trusty/autoconf/configure.in --- cdrtools-3.00~trusty~mc3man1/autoconf/configure.in 2010-05-07 17:00:25.000000000 +0000 +++ cdrtools-3.01a26~trusty/autoconf/configure.in 2014-04-02 15:38:12.000000000 +0000 @@ -1,6 +1,6 @@ -dnl @(#)configure.in 1.211 10/05/07 Copyright 1998-2009 J. Schilling +dnl @(#)configure.in 1.257 14/04/02 Copyright 1998-2014 J. Schilling dnl Process this file with autoconf to produce a configure script. -AC_REVISION(1.211)dnl +AC_REVISION(1.257)dnl dnl AC_INIT(xconfig.h.in) AC_INIT(config.guess) @@ -16,9 +16,25 @@ 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 @@ -26,6 +42,8 @@ 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) dnl Checks for header files. AC_HEADER_STDC @@ -45,20 +63,23 @@ dnl check whether select() needs sys/socket.h (BeOS) AC_HEADER_SELECT2 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 sys/file.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 sgtty.h termios.h termio.h) -AC_CHECK_HEADERS(pwd.h grp.h sys/acl.h acllib.h acl/libacl.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/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) +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) @@ -75,7 +96,9 @@ 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 @@ -99,6 +122,7 @@ AC_CHECK_HEADERS(libgen.h) AC_CHECK_HEADERS(regex.h regexp.h regexpr.h) AC_CHECK_HEADERS(dlfcn.h link.h dl.h) +AC_CHECK_HEADERS(expat.h) dnl from aclocal.m4 (uses AC_TRY_COMPILE) AC_HEADER_MAKEDEV @@ -164,6 +188,114 @@ 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 @@ -179,7 +311,7 @@ #ifdef HAVE_WCTYPE_H #include #endif -], mbstate_t, wctype_t, int) +], mbstate_t, int) AC_CHECK_SIZEOF(char) AC_CHECK_SIZEOF(short int) @@ -204,6 +336,15 @@ 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 @@ -212,8 +353,11 @@ 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 @@ -276,6 +420,7 @@ AC_FUNC_GCVT AC_FUNC_DTOA AC_FUNC_DTOA_R +AC_FUNC_GETPAGESIZE jsAC_FUNC_MMAP AC_MMAP_SIZEP AC_FUNC_SMMAP @@ -293,8 +438,11 @@ AC_FUNC_C99_ISNAN AC_FUNC_SIGSETJMP AC_FUNC_SIGLONGJMP +AC_FUNC_PRINTF_J +AC_FUNC_PRINTF_LL +AC_FUNC_REALLOC_NULL AC_CHECK_FUNCS(access eaccess euidaccess) -AC_CHECK_FUNCS(memchr memcpy memmove memset) +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) @@ -306,27 +454,45 @@ 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) AC_CHECK_FUNCS(sync fsync fork forkx vforkx forkall forkallx wait wait4 waitid 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(gethostid gethostname getdomainname getpagesize getdtablesize) +AC_CHECK_FUNCS(proc_pidpath) +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) @@ -338,18 +504,41 @@ 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(strsignal str2sig sig2str) AC_CHECK_FUNCS(kill killpg) -AC_CHECK_FUNCS(signal sigrelse sigprocmask sigsetmask sigset sigaltstack) -AC_CHECK_FUNCS(sleep usleep yield) -AC_CHECK_FUNCS(tcgetattr tcsetattr tcgetpgrp tcsetpgrp) +AC_CHECK_FUNCS(signal sighold sigrelse sigignore sigpause sigprocmask sigsetmask sigset sigaltstack sigblock) +AC_CHECK_FUNCS(alarm sleep usleep yield) +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) AC_CHECK_FUNCS(getenv putenv setenv unsetenv) -AC_CHECK_FUNCS(snprintf strcasecmp) -AC_CHECK_FUNCS(strcat strncat strcmp strncmp strcpy strlcat strlcpy strncpy strdup strndup strlen strnlen strchr strrchr) -AC_CHECK_FUNCS(wcscat wcsncat wcscmp wcsncmp wcscpy wcslcat wcslcpy wcsncpy wcsdup wcsndup wcslen wcsnlen wcschr wcsrchr) +AC_CHECK_FUNCS(snprintf strcasecmp strncasecmp) + +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) @@ -357,6 +546,7 @@ 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) @@ -406,6 +596,18 @@ ], 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 @@ -432,6 +634,8 @@ 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 @@ -451,10 +655,22 @@ [AC_CHECK_LIB(dl, dlopen, lib_dl="-ldl")]) ac_save_LIBS="$LIBS" LIBS="$LIBS $lib_dl" -AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror) +AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror dlinfo) AC_CHECK_FUNCS(shl_load shl_unload shl_gethandle) -AC_CHECK_FUNCS(LoadLibrary FreeLibrary GetProcAddress) 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 @@ -472,6 +688,9 @@ 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 @@ -494,6 +713,9 @@ 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" @@ -502,6 +724,9 @@ 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" @@ -510,6 +735,9 @@ 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" @@ -522,6 +750,61 @@ 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 @@ -544,13 +827,19 @@ 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 Access Control List support) + 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 @@ -599,6 +888,9 @@ 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" @@ -608,28 +900,17 @@ 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. -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 +AC_CHECK_FILES(/dev/tty /dev/null /dev/zero) +AC_CHECK_FILES(/dev/stdin /dev/stdout /dev/stderr) +AC_CHECK_FILES(/dev/fd/0 /dev/fd/1 /dev/fd/2) +AC_CHECK_FILES(/usr/src/linux/include) dnl Checks for OS madness. UNAME=`uname || true` @@ -665,6 +946,7 @@ 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 ***" @@ -672,6 +954,8 @@ 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 ***" @@ -680,6 +964,7 @@ echo sleep 10 fi +fi # was missing fi # Linux only tests AC_SUBST(may_linux_src_include) @@ -694,6 +979,10 @@ 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(scsi_lib) AC_SUBST(lib_scsi) AC_SUBST(lib_acl) @@ -705,5 +994,6 @@ AC_SUBST(lib_rt) AC_SUBST(lib_dl) AC_SUBST(lib_dir) +AC_SUBST(lib_cap) AC_OUTPUT(rules.cnf) diff -Nru cdrtools-3.00~trusty~mc3man1/autoconf/rules.cnf.in cdrtools-3.01a26~trusty/autoconf/rules.cnf.in --- cdrtools-3.00~trusty~mc3man1/autoconf/rules.cnf.in 2009-11-05 00:18:58.000000000 +0000 +++ cdrtools-3.01a26~trusty/autoconf/rules.cnf.in 2014-04-02 14:03:14.000000000 +0000 @@ -1,9 +1,14 @@ -# @(#)rules.cnf.in 1.22 09/11/05 Copyright 1998-2009 J. Schilling +# @(#)rules.cnf.in 1.28 14/04/02 Copyright 1998-2014 J. Schilling EXEEXT= @EXEEXT@ XEXEEXT= @XEXEEXT@ OBJEXT= @OBJEXT@ +YACC= @YACC@ +BISON= @BISON@ +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 @@ -18,6 +23,10 @@ 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_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@ @@ -27,3 +36,4 @@ LIB_RT = @lib_rt@ LIB_DL= @lib_dl@ LIB_DIR= @lib_dir@ +LIB_CAP= @lib_cap@ diff -Nru cdrtools-3.00~trusty~mc3man1/autoconf/xconfig.h.in cdrtools-3.01a26~trusty/autoconf/xconfig.h.in --- cdrtools-3.00~trusty~mc3man1/autoconf/xconfig.h.in 2010-05-07 17:00:25.000000000 +0000 +++ cdrtools-3.01a26~trusty/autoconf/xconfig.h.in 2014-05-15 19:04:57.000000000 +0000 @@ -1,9 +1,16 @@ -/* @(#)xconfig.h.in 1.198 10/05/07 Copyright 1998-2009 J. Schilling */ +/* @(#)xconfig.h.in 1.244 14/05/15 Copyright 1998-2014 J. Schilling */ /* * Dynamic autoconf C-include code. + * Do not edit, this file has been created automatically. * - * Copyright (c) 1998-2009 J. Schilling + * Copyright (c) 1998-2014 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 @@ -26,6 +33,8 @@ #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 */ @@ -45,6 +54,7 @@ #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 */ @@ -57,6 +67,9 @@ #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 */ @@ -69,9 +82,12 @@ #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() */ @@ -125,9 +141,14 @@ #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_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 */ @@ -162,9 +183,11 @@ #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 linh.h */ +#undef HAVE_LINK_H /* if we may include link.h */ #undef HAVE_DL_H /* if we may include dl.h */ +#undef HAVE_EXPAT_H /* if we may include expat.h */ + /* * Convert to SCHILY name */ @@ -199,10 +222,13 @@ #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 */ @@ -215,6 +241,7 @@ #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 */ @@ -234,11 +261,14 @@ #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_MKNODAT /* mknodat() is present in libc */ #undef HAVE_READLINKAT /* readlinkat() is present in libc */ #undef HAVE_SYMLINKAT /* symlinkat() is present in libc */ -#undef HAVE_FUTIMENS /* futimens() 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 */ @@ -268,8 +298,19 @@ #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 */ @@ -281,6 +322,7 @@ #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_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 */ @@ -347,17 +389,43 @@ #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 */ @@ -389,9 +457,16 @@ #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 */ @@ -405,12 +480,17 @@ #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 */ @@ -425,13 +505,25 @@ #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_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_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 */ @@ -450,6 +542,9 @@ #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 */ @@ -461,11 +556,24 @@ #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 */ @@ -478,6 +586,7 @@ #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) */ @@ -492,14 +601,18 @@ #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_LOADLOBRARY /* LoadLibrary() as 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 */ @@ -512,6 +625,7 @@ #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 */ @@ -522,12 +636,27 @@ #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_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_LL /* *printf() in libc supports %lld */ + /* * Functions that we defined in 1982 but where POSIX.1-2008 defined * a POSIX violating incompatible definition. @@ -548,9 +677,19 @@ /* * Misc OS stuff */ -#undef HAVE_DEV_TTY /* /dev/tty present */ -#undef HAVE_DEV_NULL /* /dev/null present */ -#undef HAVE_DEV_ZERO /* /dev/zero present */ + /* 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 */ +#endif /* * Misc OS programs @@ -633,6 +772,9 @@ /* * 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) */ @@ -647,6 +789,7 @@ #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 */ @@ -720,6 +863,25 @@ #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) */ @@ -752,6 +914,21 @@ #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_STACK_T /* if defines stack_t */ @@ -820,13 +997,17 @@ #ifdef USE_ACL /* Enable/disable ACL support */ /* - * POSIX ACL support + * The withdrawn POSIX.1e ACL draft support */ #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)*/ @@ -834,11 +1015,11 @@ #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 */ +# define HAVE_POSIX_ACL 1 /* Withdrawn POSIX draft ACL's present */ #endif /* - * Sun ACL support. + * Sun UFS ACL support. * Note: unfortunately, HP-UX has an (undocumented) acl() function in libc. */ #undef HAVE_ACL /* acl() function */ @@ -846,9 +1027,28 @@ #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_ACL) && defined(HAVE_FACL) && \ defined(HAVE_ACLFROMTEXT) && defined(HAVE_ACLTOTEXT) -# define HAVE_SUN_ACL 1 /* Sun ACL's present */ +# define HAVE_SUN_ACL 1 /* Sun UFS ACL's present */ +#endif + +#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 /* @@ -878,7 +1078,7 @@ * 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) +#if defined(HAVE_POSIX_ACL) || defined(HAVE_SUN_ACL) || defined(HAVE_NFSV4_ACL) # define HAVE_ANY_ACL 1 /* Any ACL implementation present */ #endif @@ -920,3 +1120,5 @@ /* * End restricted code for quality assurance. */ + +#endif /* __XCONFIG_H */ diff -Nru cdrtools-3.00~trusty~mc3man1/btcflash/btcflash.1 cdrtools-3.01a26~trusty/btcflash/btcflash.1 --- cdrtools-3.00~trusty~mc3man1/btcflash/btcflash.1 2010-05-28 21:18:46.000000000 +0000 +++ cdrtools-3.01a26~trusty/btcflash/btcflash.1 2014-12-03 21:04:39.000000000 +0000 @@ -1,4 +1,4 @@ -.\" @(#)btcflash.1 1.8 10/05/28 Copyr 2006 J. Schilling +.\" @(#)btcflash.1 1.9 14/12/03 Copyr 2006 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 "2010/05/28" "J\*org Schilling" "Schily\'s USER COMMANDS" +.TH BTCFLASH 1L "2014/12/03" "J\*org Schilling" "Schily\'s USER COMMANDS" .SH NAME btcflash \- Firmware flash utility for BTC DRW1008 DVD+/-RW recorder .SH SYNOPSIS @@ -418,17 +418,17 @@ .PP Additional information can be found on: .br -http://cdrecord.berlios.de/private/cdrecord.html +http://cdrecord.org/private/cdrecord.html .PP If you have support questions, send them to: .PP .B -cdrecord-support@berlios.de +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 @@ -437,8 +437,8 @@ 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-3.00~trusty~mc3man1/btcflash/btcflash.c cdrtools-3.01a26~trusty/btcflash/btcflash.c --- cdrtools-3.00~trusty~mc3man1/btcflash/btcflash.c 2010-05-24 09:40:42.000000000 +0000 +++ cdrtools-3.01a26~trusty/btcflash/btcflash.c 2010-12-19 13:51:35.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)btcflash.c 1.16 10/05/24 2004-2010 J. Schilling */ +/* @(#)btcflash.c 1.17 10/12/19 2004-2010 J. Schilling */ #ifndef lint static const char _sccsid[] = - "@(#)btcflash.c 1.16 10/05/24 2004-2010 J. Schilling"; + "@(#)btcflash.c 1.17 10/12/19 2004-2010 J. Schilling"; #endif /*--------------------------------------------------------------------------*/ /* @@ -59,13 +59,13 @@ 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); @@ -79,7 +79,7 @@ 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); return (NULL); } fclose(f); @@ -101,7 +101,7 @@ 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); @@ -109,7 +109,7 @@ 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); @@ -118,7 +118,7 @@ } 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); @@ -130,7 +130,7 @@ 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); @@ -139,7 +139,7 @@ } 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); @@ -149,7 +149,7 @@ 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); } @@ -213,42 +213,42 @@ unsigned short checksum; unsigned int offset; - printf("BTC DVD+/-RW firmware flash utility release %s %s\n", "1.16", "10/05/24"); - printf("USE AT YOUR OWN RISK!\n\n"); + printf(_("BTC DVD+/-RW firmware flash utility release %s %s\n"), "1.17", "10/12/19"); + 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"); + _("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) { @@ -257,7 +257,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); } } @@ -272,11 +272,11 @@ 0 /* Buffer ID 0 */, 0) /* Offset 0 */ < 0) { - errmsgno(EX_BAD, "Cannot write microcode checksum\n"); + 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, @@ -284,7 +284,7 @@ 0 /* Buffer ID 0 */, 0) /* Offset 0 */ < 0) { - errmsgno(EX_BAD, "Cannot save microcode\n"); + errmsgno(EX_BAD, _("Cannot save microcode\n")); return (1); } @@ -297,9 +297,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-3.00~trusty~mc3man1/btcflash/Makefile cdrtools-3.01a26~trusty/btcflash/Makefile --- cdrtools-3.00~trusty~mc3man1/btcflash/Makefile 2009-08-15 15:15:46.000000000 +0000 +++ cdrtools-3.01a26~trusty/btcflash/Makefile 2013-04-21 18:21:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile 1.11 09/08/15 +#ident @(#)Makefile 1.13 13/04/21 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -13,6 +13,8 @@ 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 \ @@ -21,7 +23,10 @@ HFILES= -LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -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: diff -Nru cdrtools-3.00~trusty~mc3man1/btcflash/MKLINKS cdrtools-3.01a26~trusty/btcflash/MKLINKS --- cdrtools-3.00~trusty~mc3man1/btcflash/MKLINKS 2009-08-15 15:15:46.000000000 +0000 +++ cdrtools-3.01a26~trusty/btcflash/MKLINKS 2011-08-04 21:45:27.000000000 +0000 @@ -1,10 +1,10 @@ #!/bin/sh ########################################################################### -#ident "@(#)MKLINKS 1.5 09/08/15 " +#ident "@(#)MKLINKS 1.7 11/08/04 " ########################################################################### -# Written 2008 by J. Schilling +# Written 2008-2011 by J. Schilling ########################################################################### -# Copyright (c) 2008 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 @@ -17,12 +17,18 @@ # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### symlink="ln -s" -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 -rm -f xxzzy.123 xxzzy.345 +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 . diff -Nru cdrtools-3.00~trusty~mc3man1/btcflash/skel.c cdrtools-3.01a26~trusty/btcflash/skel.c --- cdrtools-3.00~trusty~mc3man1/btcflash/skel.c 2010-05-11 20:16:27.000000000 +0000 +++ cdrtools-3.01a26~trusty/btcflash/skel.c 2010-12-19 13:51:35.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)skel.c 1.24 10/05/11 Copyright 1987, 1995-2010 J. Schilling */ +/* @(#)skel.c 1.25 10/12/19 Copyright 1987, 1995-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)skel.c 1.24 10/05/11 Copyright 1987, 1995-2010 J. Schilling"; + "@(#)skel.c 1.25 10/12/19 Copyright 1987, 1995-2010 J. Schilling"; #endif /* * Skeleton for the use of the scg genearal SCSI - driver @@ -31,6 +31,7 @@ #include #include #include +#include #include #include /* for setmode() prototype */ @@ -85,20 +86,20 @@ 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(_("\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); } @@ -114,6 +115,9 @@ int fcount; int cac; char * const *cav; +#if defined(USE_NLS) + char *dir; +#endif int scsibus = -1; int target = -1; int lun = -1; @@ -130,6 +134,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,15 +169,16 @@ &dev, 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-2010 Jörg Schilling (C) 2004 David Huang\n", + printf(_("btcflash %s (%s-%s-%s) Copyright (C) 1987, 1995-2010 %s (C) 2004 David Huang\n"), skel_version, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Joerg Schilling")); exit(0); } @@ -168,7 +191,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 */ @@ -177,7 +200,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 */ @@ -186,7 +209,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 */ @@ -201,11 +224,11 @@ 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) { @@ -226,9 +249,9 @@ if ((scgp = scg_open(dev, errstr, sizeof (errstr), debug, lverbose)) == (SCSI *)0) { err = geterrno(); - 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"); + 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 { @@ -241,7 +264,7 @@ scg_settarget(scgp, scsibus, target, lun); if (scg__open(scgp, NULL) <= 0) - comerr("Cannot open SCSI driver.\n"); + comerr(_("Cannot open SCSI driver.\n")); } scgp->silent = silent; scgp->verbose = verbose; @@ -253,7 +276,7 @@ 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 /* @@ -286,7 +309,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 */ @@ -317,7 +340,7 @@ if (filename) { dofile(scgp, filename); } else { - errmsgno(EX_BAD, "Firmware file missing.\n"); + errmsgno(EX_BAD, _("Firmware file missing.\n")); doit(scgp); } @@ -357,7 +380,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); } @@ -404,7 +427,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,7 +440,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)); } #endif @@ -434,7 +457,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; @@ -459,12 +482,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; @@ -472,7 +495,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-3.00~trusty~mc3man1/BUILD cdrtools-3.01a26~trusty/BUILD --- cdrtools-3.00~trusty~mc3man1/BUILD 2010-05-15 16:06:27.000000000 +0000 +++ cdrtools-3.01a26~trusty/BUILD 2014-12-03 19:11:38.000000000 +0000 @@ -22,7 +22,7 @@ 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 @@ -48,19 +48,19 @@ 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 - Replace 'star' 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 @@ -106,8 +106,8 @@ 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 + 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. @@ -165,12 +165,13 @@ 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 is stored inside the + that compiles or links programs, as the path is stored inside the binaries. The location for the root specific configuratin files is controlled @@ -184,6 +185,41 @@ 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 in a different ELF RUNPATH: In order to allow binaries to work correctly even if the shared @@ -199,14 +235,14 @@ Using a different man path prefix: - Man Pages are by default installed under: + 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=soething install + smake DEFMANBASE=something install to install man pages into $(INS_BASE)/something/man/* @@ -255,13 +291,13 @@ smake DEFINSUMASK=002 install -Using a different C-compiler: +Using a different C compiler: 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. + 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 C-compiler can be modified in the files in the + The default C compiler can be modified in the files in the DEFAULT directory. If you want to have a different compiler for one compilation, call: @@ -320,7 +356,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: @@ -340,14 +376,14 @@ export MAKEPROG exec gmake "$@" - and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make' + and call 'Gmake' instead of gmake. On Linux, there is no gmake, '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: @@ -355,7 +391,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: @@ -366,7 +402,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 @@ -377,8 +413,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 @@ -397,15 +433,38 @@ make clean make COPTX=-g LDOPTX=-g + If your debugger does not like optimized binaries, call something + like: -Creting Blastwave packages: + make "COPTX=-g -xO0" LDOPTX=-g + or + make "COPTX=-g -O0" LDOPTX=-g + + depending on the option system of 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 + + depending on the option system of 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 @@ -417,7 +476,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 @@ -430,6 +489,112 @@ 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 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 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_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 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" + + + Author: Joerg Schilling @@ -438,6 +603,6 @@ Germany Email: joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de - joerg.schilling@fokus.fraunhufer.de + joerg.schilling@fokus.fraunhofer.de Please mail bugs and suggestions to me. diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/cdda2ogg.1 cdrtools-3.01a26~trusty/cdda2wav/cdda2ogg.1 --- cdrtools-3.00~trusty~mc3man1/cdda2wav/cdda2ogg.1 2010-02-14 13:38:52.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/cdda2ogg.1 2010-09-21 20:53:46.000000000 +0000 @@ -1,5 +1,5 @@ '\" -.\" @(#)cdda2ogg.1 1.4 10/02/14 Copyright 2010 J. Schilling +.\" @(#)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 @@ -148,11 +148,11 @@ If the following files are present, then the scripts source them to set up local defaults: .TP -.B /opt/schily/bin/cdda2ogg +.B /etc/default/cdda2ogg To set up default values for .BR cdda2ogg . .TP -.B /opt/schily/bin/cdda2mp3 +.B /etc/default/cdda2mp3 To set up default values for .BR cdda2mp3 . .PP diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/cdda2wav.1 cdrtools-3.01a26~trusty/cdda2wav/cdda2wav.1 --- cdrtools-3.00~trusty~mc3man1/cdda2wav/cdda2wav.1 2010-05-25 01:00:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/cdda2wav.1 2014-03-03 22:57:08.000000000 +0000 @@ -1,5 +1,5 @@ '\" t -.\" @(#)cdda2wav.1 1.55 10/04/08 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling +.\" @(#)cdda2wav.1 1.59 14/03/03 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2013 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 @@ -29,8 +29,8 @@ .IR directories ] .SH DESCRIPTION .B cdda2wav -can retrieve audio tracks from CDROM drives that are -capable of reading audio data digitally to the host via SCSI +can retrieve audio tracks from CDROM drives which are +capable of reading audio data digitally via SCSI .RB ( CDDA ). .LP As @@ -39,7 +39,7 @@ cannot be read by other software. As .B cdda2wav -may be told to use +can use .B libparanoia (see .B \-paranoia @@ -49,7 +49,7 @@ .LP As .B cdda2wav -may be directed to write the audio data to stdout, it writes all it's informational output +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. @@ -57,7 +57,7 @@ .SS "Default settings .PP .B Cdda2wav -defaults to reead the first audio track from the medium and the default verbose level is set to +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 @@ -66,18 +66,22 @@ files. To extract all audio tracks with quality verification, it is recommended to call: .PP -.B "cdda2wav -vall cddb=0 -paranoia -B" +.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 at all. +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 in case that exactly +support and automagically finds the drive when 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, +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 @@ -158,7 +162,7 @@ .B s for stereo recording with both channels swapped .PP -The default is to do stereo recording. +The default is stereo recording. .RE .TP .BI \-C " endianess @@ -220,8 +224,8 @@ .BI \-d " duration .TP .BI \-duration " duration -sets recording time in seconds or frames. -Frames (sectors) are indicated by a 'f' suffix (like 75f for 75 sectors). +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 @@ -248,14 +252,14 @@ .B \-g .TP .B \-gui -formats the output to be better parsable by gui frontends. +reformats the output for parsing by gui frontends. .br .ne 5 .TP .B \-H .TP .B \-no\-infofile -does not write an info file, a cddb file and no cdtext file. +does not write info file, cddb file or cdtext file. .TP .BI \-i " index .TP @@ -272,7 +276,7 @@ .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 to compare MD-5 sums even for files with different header type. +to allow comparison of MD-5 sums for files with different header types. .br .ne 5 .TP @@ -301,8 +305,8 @@ .B \-no\-textdefaults By default, .B cdda2wav -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 +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 @@ -344,10 +348,10 @@ .sp The default output format is now .B wav -for all platforms as this file format has become the most +for all platforms as it has become the most common format. Note that former versions of .B cdda2wav -made an exception and by default did create +made an exception and by default created .B au type files on Solaris. .TP @@ -361,7 +365,7 @@ .BI \-set\-overlap " sectors sets the initial number of overlap .I sectors -for jitter correction in non-paranoia mode. Note that overlapped reads re handled +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. @@ -373,11 +377,26 @@ mode, the latency time for the .B \-interactive -mode is increased to typically 5..10 seconds. This is caused by the fact that the +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 reads anything at least twice and in between needs to take care of emptying the +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 @@ -397,8 +416,74 @@ 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 +.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 @@ -414,11 +499,163 @@ 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=\fIsectors\-per\-request\fP-1,retries=200 +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 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 +.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. +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 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. + +.RE .br .TP .B \-q @@ -507,7 +744,7 @@ audio-tracks list the audio tracks and their start sectors .TE .sp -The default value for the verbose-level is +The default verbose-level is .BR "toc,summary,sectors,titles" " ." .TP .B \-w @@ -564,7 +801,7 @@ .B dev= option is present, or if the .B dev= -option only contains a transport specifyer but no address, +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. @@ -591,7 +828,7 @@ SCSI OS abstraction layer. This option is not supported on all platforms. .TP .B \-scanbus -Scan all SCSI devices on all SCSI busses and print the inquiry +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: @@ -670,7 +907,7 @@ .B stdin and writes the textual replies to .BR stderr , -or the file descriptor that has been specified by the +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. @@ -721,7 +958,7 @@ sends informational output to .BR stderr . Redirecting the informational output to a different file descriptor -helps gui's and other programs that call +helps guis and other programs that call .B cdda2wav via pipes. .TP @@ -738,7 +975,7 @@ .B stdout if the output is not directed into a file. Redirecting the audio output to a different file descriptor -helps gui's and other programs that call +helps guis and other programs that call .B cdda2wav via pipes. .br @@ -751,8 +988,8 @@ .B cdda2wav is used to play back audio CDs in .B paranoia -mode, the playback is not always uninterrupted due to lack of buffering. -On the other side, allowing +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 @@ -761,7 +998,7 @@ .B \-e .TP .B \-echo -copies audio data to sound device from the operating system e.g. +copies audio data to the operating system's sound device e.g. .BR /dev/dsp . .TP .BI "sound\-device=" sounddevice @@ -842,7 +1079,7 @@ login shell. .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. @@ -985,7 +1222,7 @@ 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 @@ -1005,7 +1242,7 @@ will swap both sound channels. .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. .SS "Select sample quality" .B "\-b 8" @@ -1021,15 +1258,14 @@ .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. .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. .sp @@ -1172,7 +1408,7 @@ 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 +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, @@ -1212,7 +1448,7 @@ 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. +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. @@ -1246,7 +1482,7 @@ all present options from an initially complete set compare list. When using .BR csh (1) -you might have problems to use +you might have problems with .B "!" due to its strange parser. This is why the @@ -1380,11 +1616,11 @@ .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 @@ -1417,12 +1653,12 @@ 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. .SS "Inf files: .PP -The inf files are describing the sample files and the part from the audio cd, +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 @@ -1442,10 +1678,8 @@ is not optimal. .sp Cdda2wav should use threads. -.sp -Cdda2wav currently cannot sample hidden audio tracks that reside in 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 @@ -1465,7 +1699,7 @@ Germany .fi .SH DATE -12 Jan 2010 +2014/03/03 .br .ne 7 .SH "INTERFACE STABILITY diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/cdda2wav.c cdrtools-3.01a26~trusty/cdda2wav/cdda2wav.c --- cdrtools-3.00~trusty~mc3man1/cdda2wav/cdda2wav.c 2010-05-25 00:59:59.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/cdda2wav.c 2015-01-01 14:21:58.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)cdda2wav.c 1.134 10/02/10 Copyright 1993-2004 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling */ +/* @(#)cdda2wav.c 1.155 15/01/01 Copyright 1993-2004 Heiko Eissfeldt, Copyright 2004-2015 J. Schilling */ #include "config.h" #ifndef lint static UConst char sccsid[] = -"@(#)cdda2wav.c 1.134 10/02/10 Copyright 1993-2004 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling"; +"@(#)cdda2wav.c 1.155 15/01/01 Copyright 1993-2004 Heiko Eissfeldt, Copyright 2004-2015 J. Schilling"; #endif #undef DEBUG_BUFFER_ADDRESSES @@ -20,13 +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. */ /* * Copright 1993-2004 (C) Heiko Eissfeldt - * Copright 2004-2010 (C) J. Schilling + * Copright 2004-2015 (C) J. Schilling * * last changes: * 18.12.93 - first version, OK @@ -69,7 +71,7 @@ #include #include #include -#include +#include #include #include #include @@ -84,6 +86,8 @@ #include #include #include /* for setmode() prototype */ +#include /* To get PRIV_PFEXEC definition */ +#include #include @@ -170,6 +174,8 @@ 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[])); /* @@ -816,12 +822,12 @@ #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 @@ -850,18 +856,18 @@ /* tell minimum and maximum amplitudes, if required */ if (global.findminmax) { fprintf(outfp, - "Right channel: minimum amplitude :%d/-32768, maximum amplitude :%d/32767\n", + _("Right channel: minimum amplitude :%d/-32768, maximum amplitude :%d/32767\n"), global.minamp[0], global.maxamp[0]); fprintf(outfp, - "Left channel: minimum amplitude :%d/-32768, maximum amplitude :%d/32767\n", + _("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(outfp, - "Audio samples are originally %s.\n", - global.ismono ? "mono" : "stereo"); + _("Audio samples are originally %s.\n"), + global.ismono ? _("mono") : _("stereo")); } return; /* end of child or single process */ @@ -870,36 +876,41 @@ if (global.have_forked == 1) { #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)); } } +#endif #ifdef DEBUG_CLEANUP fprintf(stderr, - "\nW Parent child death, state:%d\n", + _("\nW Parent child death, state:%d\n"), chld_return_status); #endif } @@ -935,7 +946,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); } @@ -1014,11 +1025,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); } } @@ -1085,7 +1096,7 @@ 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; } @@ -1096,7 +1107,7 @@ 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); } @@ -1106,19 +1117,19 @@ 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\ ts=# set maximum transfer size for a single SCSI command\n\ (-A) auxdevice=device set the aux device (typically /dev/cdrom).\n\ @@ -1183,11 +1194,11 @@ 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); @@ -1199,17 +1210,17 @@ FILE *f; { /* BEGIN CSTYLED */ - fprintf(f, "\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(f, "\ - type: %s filename: '%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(f, "\ - use: '%s', device: '%s', aux: '%s'\n", + fprintf(f, _("\ + use: '%s', device: '%s', aux: '%s'\n"), DEF_INTERFACE, CD_DEVICE, AUX_DEVICE); /* END CSTYLED */ } @@ -1248,6 +1259,23 @@ 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 */ @@ -1313,12 +1341,15 @@ 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; @@ -1370,7 +1401,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); @@ -1437,7 +1468,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; } @@ -1451,13 +1482,15 @@ 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 @@ -1472,7 +1505,7 @@ { #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 { @@ -1482,17 +1515,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__) || defined(__MINGW32__) +#if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER) /* * NOTE: Base.h from Cygwin-B20 has a second typedef for BOOL. @@ -1509,11 +1544,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 void @@ -1527,7 +1561,7 @@ /* * XXX No errno? */ - errmsgno(EX_BAD, "No realtime priority possible.\n"); + errmsgno(EX_BAD, _("No realtime priority possible.\n")); return; } @@ -1539,7 +1573,7 @@ /* * XXX No errno? */ - errmsgno(EX_BAD, "Could not set realtime priority.\n"); + errmsgno(EX_BAD, _("Could not set realtime priority.\n")); } } #else @@ -1573,8 +1607,8 @@ int status; { #if defined DEBUG_CLEANUP - fprintf(stderr, "Exit(%d) for %s\n", - status, global.child_pid == 0 ? "Child" : "Parent"); + fprintf(stderr, _("Exit(%d) for %s\n"), + status, global.child_pid == 0 ? _("Child") : _("Parent")); fflush(stderr); #endif @@ -1605,8 +1639,8 @@ { global.parent_died = 1; #if defined DEBUG_CLEANUP - fprintf(stderr, "SIGPIPE received from %s\n.", - global.child_pid == 0 ? "Child" : "Parent"); + fprintf(stderr, _("SIGPIPE received from %s.\n"), + global.child_pid == 0 ? _("Child") : _("Parent")); #endif #ifdef HAVE_KILL if (global.child_pid == 0) { @@ -1643,9 +1677,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; @@ -1655,9 +1695,9 @@ } *para_stat; -LOCAL void paranoia_reset __PR((void)); +LOCAL void paranoia_statreset __PR((void)); LOCAL void -paranoia_reset() +paranoia_statreset() { para_stat->c_sector = 0; para_stat->v_sector = 0; @@ -1673,7 +1713,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; @@ -1698,12 +1744,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) { @@ -1713,13 +1761,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) { @@ -1729,21 +1783,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) @@ -1751,25 +1829,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); @@ -1919,7 +2001,7 @@ CD_FRAMESIZE_RAW); } else { errmsgno(EX_BAD, - "E unrecoverable error!\n"); + _("E unrecoverable error!\n")); exit(READ_ERROR); } } @@ -2165,7 +2247,7 @@ if (left_in_track < 0) { errmsgno(EX_BAD, - "internal error: negative left_in_track:%ld, current_track=%d\n", + _("internal error: negative left_in_track:%ld, current_track=%d\n"), left_in_track, current_track); } @@ -2231,22 +2313,28 @@ 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(' ', outfp); + #ifndef THOMAS_SCHAU_MAL if ((unsigned long)left_in_track > InSamples) { - fputs(" incomplete", outfp); + fputs(_(" incomplete"), outfp); } #endif if (global.tracktitle[current_track] != NULL) { fprintf(outfp, - " track %2u '%s' recorded", + _(" track %2u '%s' recorded"), current_track, global.tracktitle[current_track]); } else { fprintf(outfp, - " track %2u recorded", + _(" track %2u recorded"), current_track); } #ifdef USE_PARANOIA @@ -2257,47 +2345,59 @@ 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) { + if (para_stat->readerrs || para_stat->c2badsecs) { fprintf(outfp, - " with audible hard errors"); + _(" with audible hard errors")); } else if ((para_stat->skips) > 0) { fprintf(outfp, - " with %sretry/skip errors", - f < 2.0 ? "":"audible "); + _(" with %sretry/skip errors"), + f < 2.0 ? "":_("audible ")); } else if (oper > 0) { oper = f; - fprintf(outfp, " with "); - if (oper < 2) - fprintf(outfp, "minor"); - else if (oper < 10) - fprintf(outfp, "medium"); + fprintf(outfp, _(" with ")); + if (oper < 4) + fprintf(outfp, _("minor")); + else if (oper < 16) + fprintf(outfp, _("medium")); else if (oper < 67) fprintf(outfp, - "noticable audible"); + _("noticeable audible")); else if (oper < 100) fprintf(outfp, - "major audible"); + _("major audible")); else fprintf(outfp, - "extreme audible"); - fprintf(outfp, " problems"); + _("extreme audible")); + fprintf(outfp, _(" problems")); } else { - fprintf(outfp, " successfully"); + fprintf(outfp, _(" successfully")); + } + if (f >= 0.1 || fc2 > 0.1) { + fprintf(outfp, " ("); } if (f >= 0.1) { fprintf(outfp, - " (%.1f%% problem sectors)", f); + _("%.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(outfp, " successfully"); + fprintf(outfp, _(" successfully")); #endif if (waitforsignal == 1) { fprintf(outfp, - ". %d silent samples omitted", + _(". %d silent samples omitted"), global.SkippedSamples); } fputs("\n", outfp); @@ -2305,7 +2405,7 @@ if (global.reads_illleadout && *eorecording == 1) { fprintf(outfp, - "Real lead out at: %ld sectors\n", + _("Real lead out at: %ld sectors\n"), (*nSamplesToDo+BeginAtSample)/CD_FRAMESAMPLES); } #ifdef USE_PARANOIA @@ -2315,7 +2415,7 @@ if (para_stat->minoverlap == 0x7FFFFFFF) para_stat->minoverlap = 0; fprintf(outfp, - " %u rderr, %u skip, %u atom, %u edge, %u drop, %u dup, %u drift\n", + _(" %u rderr, %u skip, %u atom, %u edge, %u drop, %u dup, %u drift"), para_stat->readerrs, para_stat->skips, para_stat->fixup_atoms, @@ -2323,16 +2423,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(outfp, - " %u overlap(%.4g .. %.4g)\n", + _(" %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 } @@ -2391,9 +2510,9 @@ #define PRINT_OVERLAP_INIT \ if (global.verbose) { \ if (global.overlap > 0) \ - fprintf(outfp, "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%", outfp); \ + fputs(_("percent_done:\n 0%"), outfp); \ } #if defined HAVE_FORK_AND_SHAREDMEM @@ -2460,7 +2579,7 @@ if (total_unsuccessful_retries) { fprintf(stderr, - "%u unsuccessful matches while reading\n", + _("%u unsuccessful matches while reading\n"), total_unsuccessful_retries); } } @@ -2475,7 +2594,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(); @@ -2553,7 +2673,7 @@ } 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); } } @@ -2562,7 +2682,7 @@ LOCAL void verbose_usage() { - fputs("\ + fputs(_("\ help lists all verbose options.\n\ disable disables verbose mode.\n\ all enables all verbose options.\n\ @@ -2576,7 +2696,7 @@ sectors display the start sectors of each track.\n\ titles display any known track titles.\n\ audio-tracks list the audio tracks and their start sectors.\n\ -", stderr); +"), stderr); } #ifdef USE_PARANOIA @@ -2586,16 +2706,18 @@ 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\ - proof shortcut for minoverlap=sectors-per-request-1,retries=200.\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 shortcut for minoverlap=20,retries=200,readahead=600.\n\ +"), stderr); /* END CSTYLED */ } @@ -2669,10 +2791,10 @@ 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); } @@ -2714,6 +2836,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; @@ -2744,6 +2874,8 @@ 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); @@ -2751,8 +2883,16 @@ *flagp = 1; global.paranoia_parms.mindynoverlap = -1; global.paranoia_parms.retries = 200; + global.paranoia_parms.readahead = 600; +#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); } @@ -2761,7 +2901,7 @@ 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 } @@ -2776,25 +2916,45 @@ char *argv[]; { long lSector_p1; - long sector_offset = 0; - long start_sector = -1; - unsigned long endtrack = (unsigned int)-1; - BOOL alltracks = FALSE; - BOOL maxtrack = FALSE; - 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 */ @@ -2811,9 +2971,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"); @@ -2831,1343 +3020,1419 @@ 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; - BOOL md5blocksize = FALSE; - int userverbose = -1; - int outfd = -1; - int audiofd = -1; +#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, &global.paranoia_flags, - &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, - &global.no_textdefaults, - &global.no_textfile, - &global.cuefile, - &global.no_hidden_track, + 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, - &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, +#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, - &md5blocksize, &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, &start_sector, + if (global.verbose != 0) { + fprintf(outfp, + _("%u bytes buffer memory requested, transfer size %ld bytes, %d buffers, %d 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, &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); + 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 ", outfp); - fputs(VERSION, outfp); - fputs(VERSION_OS, outfp); - fputs("\n", outfp); -#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-2010 Jörg Schilling\n", - VERSION, - HOST_CPU, HOST_VENDOR, HOST_OS); - prdefaults(stdout); -#endif + } + if (global.verbose == SHOW_JUSTAUDIOTRACKS) { + unsigned int z; + + /* + * 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 (help) { - usage(); + + 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 +#if defined ECHO_TO_SOUNDCARD + fputs(_(", soundcard"), outfp); +#endif +#if defined USE_PARANOIA + fputs(_(", libparanoia"), outfp); +#endif + fputs(_(" support\n"), outfp); } - if (outfd >= 0) { -#ifdef F_GETFD - if (fcntl(outfd, F_GETFD, 0) < 0) - comerr("Cannot redirect output to fd %d.\n", outfd); + + /* + * 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 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 +#if defined(HAVE_NICE) && (HAVE_NICE == 1) + nice(-NZERO); #endif - global.out_fp = fdopen(outfd, "wa"); - if (global.out_fp == NULL) - comerr("Cannot open output fd %d.\n", outfd); +#endif + if (global.issetuid || global.uid != 0) + priv_off(); + dontneedroot(); } - 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 */ +#endif - if (dump_rates) { /* list available rates */ - int ii; + /* + * switch cdrom to audio mode + */ + EnableCdda(get_scsi_p(), 1, CD_FRAMESIZE_RAW); - /* 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; + atexit(CloseAll); + + DisplayToc(); + if (FirstAudioTrack() == -1) { + if (no_disguised_audiotracks()) { + FatalError(EX_BAD, + _("This disk has no audio tracks.\n")); } - exit(NO_ERROR); } - if (channels) { - if (*channels == 's') { - global.channels = 2; - global.swapchannels = 1; - } else { - global.channels = strtol(channels, NULL, 10); - } + + Read_MCN_ISRC(); + + /* + * 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 (irate >= 0) { - rate = irate; + + /* + * check if end track is in range + */ + if (global.endtrack < track || global.endtrack > cdtracks) { + usage2(_("Incorrect end track setting: %ld\n"), global.endtrack); } - 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); + + /* + * Find track that is related to the absolute sector offset. + */ + if (global.start_sector != -1) { + int t; + + 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; } } - if (sector_offset != 0 && start_sector != -1) { - errmsgno(EX_BAD, "-offset and -start-sector are mutual exclusive.\n"); - exit(SYNTAX_ERROR); - } - if (trackspec) { - char * endptr; - char * endptr2; - if (streql(trackspec, "all")) { - alltracks = TRUE; + do { + if (track == 0) { + lSector = 0; + lSector_p1 = Get_AudioStartSector(1); } 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) { - alltracks = TRUE; - /* - * Hack for write_cue_track() to - * use correct INDEX offsets. - */ - if (track == 1) - global.no_hidden_track = TRUE; - } - maxtrack = TRUE; - endptr2 = endptr; + lSector = Get_AudioStartSector(track); + lSector_p1 = Get_EndSector(track) + 1; + } + if (lSector < 0) { + if (bulk == 0 && !global.alltracks) { + FatalError(EX_BAD, + _("Track %d not found.\n"), track); } else { - endtrack = strtoul(endptr, &endptr2, 10); - } - if (endptr2 == endptr) { /* endtrack empty */ - endtrack = track; - } else if (track == endtrack) { /* manually -tn+n */ - bulk = -1; + fprintf(outfp, + _("Skipping data track %d...\n"), track); + if (global.endtrack == track) + global.endtrack++; + track++; } } - if (start_sector != -1 && !alltracks) { - errmsgno(EX_BAD, "-t and -start-sector are mutual exclusive.\n"); - exit(SYNTAX_ERROR); + } while ((bulk != 0 || global.alltracks) && track <= cdtracks && lSector < 0); + + 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); } } - 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; -#endif - } else if (*end_ptr != '\0') { - rectime = -1.0; - } + + lSector += global.sector_offset; + /* + * check against end sector of track + */ + if (lSector >= lSector_p1) { + fprintf(stderr, + _("W Sector offset %lu exceeds track size (ignored)\n"), + global.sector_offset); + lSector -= global.sector_offset; } - 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", oendianess); - } + + if (lSector < 0L) { + fputs(_("Negative start sector! Set to zero.\n"), stderr); + lSector = 0L; } - if (cendianess) { - if (strcasecmp(cendianess, "little") == 0) { - littleendian = 1; - } else if (strcasecmp(cendianess, "big") == 0) { - littleendian = 0; - } else if (strcasecmp(cendianess, "machine") == 0 || - strcasecmp(cendianess, "host") == 0) { -#ifdef WORDS_BIGENDIAN - littleendian = 0; -#else - littleendian = 1; -#endif - } else if (strcasecmp(cendianess, "guess") == 0) { - littleendian = -2; + + 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 (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 { - usage2("Wrong parameter '%s' for option -C", cendianess); + fputs( + _("Track range does not consist of audio tracks only (ignored)\n"), + stderr); } - } - 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); + } 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; } - 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; + + /* calculate # of samples to read */ + *nSamplesToDo = (long)(global.rectime*44100.0 + 0.5); } - if (global.just_the_toc) { - global.verbose = SHOW_MAX; - bulk = 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); } - 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.moreargs < argc) { + if (strcmp(argv[global.moreargs], "-") == 0 || + is_fifo(argv[global.moreargs])) { + /* + * pipe mode + */ + 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; + } } - if (global.no_file) { + if (global.no_infofile == 0) { 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.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(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; + } } 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 (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", global.bufsize); + 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; + } } - if (global.buffers < 1) { - usage2("Incorrect buffer setting: %d", global.buffers); - } + SamplesToWrite = *nSamplesToDo*2/(int)global.int_part; - if (global.nsectors < 1) { - usage2("Incorrect nsectors setting: %d", global.nsectors); - } + { + int first = FirstAudioTrack(); - if (global.verbose < 0 || global.verbose > SHOW_MAX) { - usage2("Incorrect verbose level setting: %d", global.verbose); + tracks_included = Get_Track( + (unsigned) (lSector + + *nSamplesToDo/CD_FRAMESAMPLES -1)) + - max((int)track, first) +1; } - 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); + if (global.multiname != 0 && global.moreargs + tracks_included > argc) { + global.multiname = 0; } - if (global.channels != 1 && global.channels != 2) { - usage2("Incorrect channel setting: %d", global.channels); - } + if (!waitforsignal) { - if (bits != 8 && bits != 12 && bits != 16) { - usage2("Incorrect bits_per_sample setting: %d", bits); - } +#ifdef INFOFILES + if (!global.no_infofile) { + int i; - if (rate < 827.0 || rate > 44100.0) { - usage2("Incorrect sample rate setting: %d.%02d", - (int)rate, ((int)rate*100) % 100); - } + for (i = track; i < (int)track + tracks_included; i++) { + unsigned minsec, maxsec; + char *tmp_fname; - int_part = (double)(long) (2*44100.0 / rate); + /* + * 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; - if (2*44100.0 / rate - int_part >= 0.5) { - int_part += 1.0; - fprintf(outfp, - "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; + /* + * 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); - 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); - } + cuef = cue_file_open(global.fname_base); + write_cue_global(cuef, global.fname_base); - /* - * 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) { - /* - * 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]; + for (i = track; i < (int)track + tracks_included; i++) { + unsigned minsec, maxsec; - fetch_lame_version(Lame_version); - fprintf(outfp, - "Using LAME version %s.\n", Lame_version); - } - if (bits < 9) { - bits = 16; - fprintf(outfp, - "Warning: sample size forced to 16 bit for MP3 format.\n"); + 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); + } + + /* + * 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); } -#endif /* USE_LAME */ - } else { - usage2("Incorrect audio type setting: %3s", audio_type); } - if (bulk == -1) - bulk = 0; + if (global.just_the_toc) + exit(NO_ERROR); - global.need_big_endian = global.audio_out->need_big_endian; - if (global.outputendianess != NONE) - global.need_big_endian = global.outputendianess == BIG; +#ifdef ECHO_TO_SOUNDCARD + if (global.user_sound_device[0] != '\0') { + set_snd_device(global.user_sound_device); + } + init_soundcard(rate, bits); +#endif /* ECHO_TO_SOUNDCARD */ - if (global.no_file) - global.fname_base[0] = '\0'; + if (global.userspeed > -1) + global.speed = global.userspeed; - if (!bulk) { - strcat(global.fname_base, "."); - strcat(global.fname_base, audio_type); + if (global.speed != 0 && SelectSpeed != NULL) { + SelectSpeed(get_scsi_p(), global.speed); } - /* - * 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; - } + current_track = track; - /* - * 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; + if (!global.no_file) { + { + char *myfname; - /* - * 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) { - if (audiofd >= 0) { -#ifdef F_GETFD - if (fcntl(audiofd, F_GETFD, 0) < 0) { - comerr( - "Cannot redirect audio data to fd %d.\n", - audiofd); - } -#endif - global.audio = audiofd; - } else { - global.audio = dup(fileno(stdout)); + 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; } - 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[moreargs])) { - /* - * we do have at least one argument - */ - global.multiname = 1; - strlcpy(global.fname_base, - argv[moreargs], - sizeof (global.fname_base)); } + + /* strip audio_type extension */ + cut_extension(global.fname_base); + if (bulk && global.multiname == 0) { + sprintf(fname, "%s_%02u.%s", + global.fname_base, current_track, audio_type); + } else { + sprintf(fname, "%s.%s", global.fname_base, audio_type); + } + + OpenAudio(fname, rate, bits, global.channels, + (unsigned)(SamplesToWrite*global.OutSampleSize*global.channels), + global.audio_out); } -} /* End of getargs() local vars */ -#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 + global.Remainder = (75 % global.nsectors)+1; - /* setup interface and open cdrom device */ - /* - * request sychronization facilities and shared memory - */ - SetupInterface(); + global.sh_bits = 16 - bits; /* shift counter */ - /* - * use global.useroverlap to set our overlap - */ - if (global.useroverlap != -1) - global.overlap = global.useroverlap; + global.iloop = *nSamplesToDo; + if (Halved && (global.iloop&1)) + global.iloop += 2; - /* - * 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; - } + BeginAtSample = lSector * CD_FRAMESAMPLES; - 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 1 + if ((global.verbose & SHOW_SUMMARY) && !global.just_the_toc && + (global.reads_illleadout == 0 || + lSector+*nSamplesToDo/CD_FRAMESAMPLES + <= (unsigned) Get_AudioStartSector(cdtracks-1))) { - /* - * 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; + 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 - 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; -#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); - } +#if defined(HAVE_SEMGET) && defined(USE_SEMAPHORES) +#else + init_pipes(); #endif + #ifdef USE_PARANOIA - { - int i = 0; - char *ptr = (char *)he_fill_buffer; + if (global.paranoia_selected) { + long paranoia_mode; - para_stat = (struct paranoia_statistics *)he_fill_buffer; - while (i < sizeof (struct paranoia_statistics)) { - i += global.pagesize; - ptr += global.pagesize; - global.shmsize -= global.pagesize; + 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) { + if (ReadCddaFallbackMMC_C2 == NULL) { + if (global.verbose) + fprintf(outfp, _("c2check not supported by drive.\n")); + } else { + if (global.verbose) + fprintf(outfp, _("using c2check in to verify reads.\n")); + paranoia_mode |= PARANOIA_MODE_C2CHECK; + } } - he_fill_buffer = (myringbuff **)ptr; - } -#endif -#ifdef MD5_SIGNATURES - { - int i = 0; - char *ptr = (char *)he_fill_buffer; - global.context = (MD5_CTX*)he_fill_buffer; - while (i < sizeof (MD5_CTX)) - i += global.pagesize; - ptr += i; - global.shmsize -= i; - - he_fill_buffer = (myringbuff **)ptr; - } -#endif - - if (global.verbose != 0) { - fprintf(outfp, - "%u bytes buffer memory requested, transfer size %ld bytes, %d buffers, %d sectors\n", - global.shmsize, global.bufsize, global.buffers, global.nsectors); - } + 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); - /* - * 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 (global.paranoia_parms.overlap >= 0) { + int overlap = global.paranoia_parms.overlap; - set_total_buffers(global.buffers, sem_id); + if (overlap > global.nsectors - 1) + overlap = global.nsectors - 1; + paranoia_overlapset(global.cdp, overlap); + } + /* + * Implement the shortcut "paraopts=proof" + */ + 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); + paranoia_modeset(global.cdp, paranoia_mode); + global.paranoia_mode = paranoia_mode; -#if defined(HAVE_SEMGET) && defined(USE_SEMAPHORES) - atexit(free_sem); + 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); + } + } else { + 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) /* - * set input endian default + * 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 (littleendian != -1) - *in_lendian = 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 (maxtrack) { - endtrack = cdtracks; - } + /* forking */ + if (!global.no_fork) + global.child_pid = fork(); - calc_cddb_id(); - calc_cdindex_id(); + if (global.child_pid > 0 && global.gui > 0 && global.verbose > 0) + fprintf(stderr, _("child pid is %lld\n"), (Llong)global.child_pid); -#if 1 - Check_Toc(); -#endif + /* ********************** fork ************************************* */ + if (global.child_pid == 0) { + /* child WRITER section */ - if (ReadTocText != NULL && FirstAudioTrack() != -1) { - ReadTocText(get_scsi_p()); - handle_cdtext(); +#ifdef HAVE_AREAS /* - * 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. + * 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. */ - } - if (global.verbose == SHOW_JUSTAUDIOTRACKS) { - unsigned int z; - + area_info inf; + int32 cook = 0; /* - * XXX We did not check for hidden Track here + * iterate over all mappings to find our shared memory mapping. */ - for (z = 0; z <= cdtracks; z++) { - if (Get_Datatrack(z) == 0) { - printf("%02d\t%06ld\n", - Get_Tracknumber(z), - Get_AudioStartSector(z)); + 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); + } + /* clone the parent mapping without cow. */ + if (B_OK > clone_area("shm_child", + &area_address, B_ANY_ADDRESS, + B_READ_AREA | B_WRITE_AREA, area_parent)) { + errmsgno(EX_BAD, + _("clone_area failed\n")); + exit(SHMMEM_ERROR); + } } } - exit(NO_ERROR); - } - - 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 -#if defined ECHO_TO_SOUNDCARD - fputs(", soundcard", outfp); +#ifdef __EMX__ + if (DosGetSharedMem(he_fill_buffer, 3)) { + comerr(_("DosGetSharedMem() failed.\n")); + } #endif -#if defined USE_PARANOIA - fputs(", libparanoia", outfp); + global.have_forked = 1; + forked_write(); +#ifdef __EMX__ + DosFreeMem(he_fill_buffer); + _exit(NO_ERROR); + /* NOTREACHED */ #endif - fputs(" support\n", outfp); - } - - /* - * Also handles the CD-Text or CD-Extra information that has been read - * avove with ReadTocText(). - */ - FixupTOC(cdtracks + 1); + exit_wrapper(NO_ERROR); + /* NOTREACHED */ + } else if (global.child_pid > 0) { + /* parent READER section */ - if (track == (unsigned int)-1) { - if (useHiddenTrack() && (bulk || alltracks)) - endtrack = track = 0; - else - endtrack = track = 1; - if (bulk || alltracks) - endtrack = cdtracks; - } + global.have_forked = 1; + switch_to_realtime_priority(); -#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); + 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 - priv_off(); - dontneedroot(); + exit_wrapper(NO_ERROR); + /* NOTREACHED */ + } else { + if (global.child_pid != -2) + errmsg(_("Cannot fork.\n")); } -#endif - - /* - * switch cdrom to audio mode - */ - EnableCdda(get_scsi_p(), 1, CD_FRAMESIZE_RAW); - atexit(CloseAll); +#endif /* defined(HAVE_FORK_AND_SHAREDMEM) */ - DisplayToc(); - if (FirstAudioTrack() == -1) { - if (no_disguised_audiotracks()) { - FatalError(EX_BAD, - "This disk has no audio tracks.\n"); + /* 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 - Read_MCN_ISRC(); + return (0); +} - /* - * check if start track is in range - */ - if (track < 1 || track > cdtracks) { - if (!(track == 0 && useHiddenTrack())) - usage2("Incorrect start track setting: %d", track); - } +LOCAL void +priv_warn(what, msg) + const char *what; + const char *msg; +{ + errmsgno(EX_BAD, "Insufficient '%s' privileges. %s\n", what, msg); +} - /* - * check if end track is in range - */ - if (endtrack < track || endtrack > cdtracks) { - usage2("Incorrect end track setting: %ld", endtrack); - } +LOCAL void +gargs(argc, argv) + int argc; + char *argv[]; +{ + int cac; + char *const*cav; - /* - * Find track that is related to the absolute sector offset. - */ - if (start_sector != -1) { - int t; + 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; - for (t = 1; t <= cdtracks; t++) { - lSector = Get_AudioStartSector(t); - lSector_p1 = Get_EndSector(t) + 1; - if (lSector < 0) - continue; - if (start_sector >= lSector && - start_sector < lSector_p1) { - track = t; - sector_offset = start_sector - lSector; - } else if (t == 1 && useHiddenTrack() && - start_sector >= 0 && - start_sector < lSector) { - lSector = start_sector; - track = 0; - } - if (bulk || alltracks) - endtrack = t; - } - } + 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; + int userverbose = -1; + int outfd = -1; + int audiofd = -1; - 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 && !alltracks) { - FatalError(EX_BAD, - "Track %d not found.\n", track); - } else { - fprintf(outfp, - "Skipping data track %d...\n", track); - if (endtrack == track) - endtrack++; - track++; - } - } - } while ((bulk != 0 || alltracks) && track <= cdtracks && lSector < 0); + cac = argc; + cav = argv; + cac--; + cav++; + if (getargs(&cac, &cav, opts, + &global.paranoia_selected, + handle_paranoia_opts, &global.paranoia_flags, + &version, + &help, &help, - 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 || alltracks); - } else { - cd_index = 1; - if (global.deemphasize || (global.verbose & SHOW_INDICES)) { - ScanIndices(track, cd_index, bulk || alltracks); - } - } + &global.no_file, &global.no_file, - 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; - } + &dump_rates, &dump_rates, + &bulk, &bulk, &bulk, + &global.scsi_verbose, &global.scsi_verbose, - if (lSector < 0L) { - fputs("Negative start sector! Set to zero.\n", stderr); - lSector = 0L; - } + &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, - lSector_p2 = Get_LastSectorOnCd(track); - if ((bulk == 1 || alltracks) && 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; + &global.deemphasize, &global.deemphasize, + &global.just_the_toc, &global.just_the_toc, + &global.scsi_silent, &global.scsi_silent, - if (lSector_p2 >= 0) { - rectime = (lSector_p2 - lSector) / 75.0; - *nSamplesToDo = (long)(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", + &global.cddbp_server, &global.cddbp_port, + &global.scanbus, + &global.dev_name, &global.dev_name, &global.dev_name, + &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); - } - } else { + 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 /* - * Prepare the maximum recording duration. - * It is defined as the biggest amount of - * adjacent audio sectors beginning with the - * specified track/index/offset. + * Make the version string similar for all cdrtools programs. */ - if (rectime > (lSector_p2 - lSector) / 75.0) { - rectime = (lSector_p2 - lSector) / 75.0; - lSector_p1 = lSector_p2; - } - - /* calculate # of samples to read */ - *nSamplesToDo = (long)(rectime*44100.0 + 0.5); + printf(_("cdda2wav %s (%s-%s-%s) Copyright (C) 1993-2004 %s (C) 2004-2015 %s\n"), + VERSION, + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Heiko Eissfeldt"), + _("Joerg Schilling")); + prdefaults(stdout); +#endif + exit(NO_ERROR); } - - 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 (help) { + usage(); } - 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; - } - global.no_cddbfile = 1; + 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); + } + 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; } + exit(NO_ERROR); } - 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 (alltracks) { - fprintf(stderr, - "W Option -tall 'all tracks into one file' 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 && !alltracks && - !((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"); + if (channels) { + if (*channels == 's') { + global.channels = 2; + global.swapchannels = 1; } else { - global.no_infofile = 0; + global.channels = strtol(channels, NULL, 10); } } - 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 (!alltracks) { - fprintf(stderr, - "W Not selecting all tracks disables generation of cue file!\n"); - global.cuefile = 0; - } + if (irate >= 0) { + rate = irate; } - - SamplesToWrite = *nSamplesToDo*2/(int)int_part; - - { - int first = FirstAudioTrack(); - - tracks_included = Get_Track( - (unsigned) (lSector + - *nSamplesToDo/CD_FRAMESAMPLES -1)) - - max((int)track, first) +1; + 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.multiname != 0 && moreargs + tracks_included > argc) { - global.multiname = 0; + 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; - if (!waitforsignal) { - -#ifdef INFOFILES - if (!global.no_infofile) { - int i; - - for (i = track; i < (int)track + tracks_included; i++) { - unsigned minsec, maxsec; - char *tmp_fname; - - /* - * 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 + 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 (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; } - if (!bulk) - break; + global.maxtrack = TRUE; + endptr2 = endptr; + } else { + global.endtrack = strtoul(endptr, &endptr2, 10); } - reset_name_iterator(); - } -#endif - if (global.cuefile) { - int i; - char *tmp_fname; - FILE *cuef; - - /* - * 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); - - cuef = cue_file_open(global.fname_base); - write_cue_global(cuef, global.fname_base); - - for (i = track; i < (int)track + tracks_included; i++) { - unsigned minsec, maxsec; - - 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_cue_track(cuef, global.fname_base, i); - } - - /* - * 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); + if (endptr2 == endptr) { /* endtrack empty */ + global.endtrack = track; + } else if (track == global.endtrack) { /* manually -tn+n */ + bulk = -1; } - reset_name_iterator(); - if (cuef) - fclose(cuef); + } + if (global.start_sector != -1 && !global.alltracks) { + errmsgno(EX_BAD, _("-t and -start-sector are mutual exclusive.\n")); + exit(SYNTAX_ERROR); } } - - if (global.just_the_toc) - exit(NO_ERROR); - -#ifdef ECHO_TO_SOUNDCARD - if (user_sound_device[0] != '\0') { - set_snd_device(user_sound_device); - } - init_soundcard(rate, bits); -#endif /* ECHO_TO_SOUNDCARD */ - - if (global.userspeed > -1) - global.speed = global.userspeed; - - if (global.speed != 0 && SelectSpeed != NULL) { - SelectSpeed(get_scsi_p(), global.speed); + 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; + } } - - current_track = track; - - if (!global.no_file) { - { - char *myfname; - - 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; - } + 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); } - - /* strip audio_type extension */ - cut_extension(global.fname_base); - if (bulk && global.multiname == 0) { - sprintf(fname, "%s_%02u.%s", - global.fname_base, current_track, audio_type); + } + 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 { - sprintf(fname, "%s.%s", global.fname_base, audio_type); + usage2(_("Wrong parameter '%s' for option -C\n"), cendianess); } - - OpenAudio(fname, rate, bits, global.channels, - (unsigned)(SamplesToWrite*global.OutSampleSize*global.channels), - global.audio_out); } - - global.Remainder = (75 % global.nsectors)+1; - - global.sh_bits = 16 - bits; /* shift counter */ - - global.iloop = *nSamplesToDo; - if (Halved && (global.iloop&1)) - global.iloop += 2; - - BeginAtSample = lSector * CD_FRAMESAMPLES; - -#if 1 - if ((global.verbose & SHOW_SUMMARY) && !global.just_the_toc && - (global.reads_illleadout == 0 || - lSector+*nSamplesToDo/CD_FRAMESAMPLES - <= (unsigned) Get_AudioStartSector(cdtracks-1))) { - - 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)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(outfp, " ->'%s'...", global.fname_base); - fputs("\n", outfp); + 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 - -#if defined(HAVE_SEMGET) && defined(USE_SEMAPHORES) + 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 - init_pipes(); + global.echo = TRUE; #endif - -#ifdef USE_PARANOIA + } if (global.paranoia_selected) { - long paranoia_mode; - - 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); + 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); + } - if (global.paranoia_parms.overlap >= 0) { - int overlap = global.paranoia_parms.overlap; + if (global.buffers < 1) { + usage2(_("Incorrect buffer setting: %d\n"), global.buffers); + } - if (overlap > global.nsectors - 1) - overlap = global.nsectors - 1; - paranoia_overlapset(global.cdp, overlap); - } - /* - * Implement the shortcut "paraopts=proof" - */ - if ((global.paranoia_flags & 1) && - global.paranoia_parms.mindynoverlap < 0) { - 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); + if (global.nsectors < 1) { + usage2(_("Incorrect nsectors setting: %d\n"), global.nsectors); + } - paranoia_mode = PARANOIA_MODE_FULL ^ PARANOIA_MODE_NEVERSKIP; + if (global.verbose < 0 || global.verbose > SHOW_MAX) { + usage2(_("Incorrect verbose level setting: %d\n"), global.verbose); + } + if (global.verbose == 0) + global.quiet = 1; - 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.rectime < 0.0) { + usage2(_("Incorrect recording time setting: %d.%02d\n"), + (int)global.rectime, (int)(global.rectime*100+0.5) % 100); + } - paranoia_modeset(global.cdp, paranoia_mode); - if (global.verbose) - fprintf(outfp, "using lib paranoia for reading.\n"); - paranoia_seek(global.cdp, lSector, SEEK_SET); - paranoia_reset(); + if (global.channels != 1 && global.channels != 2) { + usage2(_("Incorrect channel setting: %d\n"), global.channels); } -#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 (bits != 8 && bits != 12 && bits != 16) { + usage2(_("Incorrect bits_per_sample setting: %d\n"), bits); + } - /* forking */ - if (!global.no_fork) - global.child_pid = fork(); + if (rate < 827.0 || rate > 44100.0) { + usage2(_("Incorrect sample rate setting: %d.%02d\n"), + (int)rate, ((int)rate*100) % 100); + } - if (global.child_pid > 0 && global.gui > 0 && global.verbose > 0) - fprintf(stderr, "child pid is %lld\n", (Llong)global.child_pid); + global.int_part = (double)(long) (2*44100.0 / rate); - /* ********************** fork ************************************* */ - if (global.child_pid == 0) { - /* child WRITER section */ + 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; -#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; + 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); + } + + /* + * 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) { /* - * iterate over all mappings to find our shared memory mapping. + * Enhanced compatibility */ - 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; + 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]; - /* 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); - } - } + fetch_lame_version(Lame_version); + fprintf(outfp, + _("Using LAME version %s.\n"), Lame_version); } -#endif -#ifdef __EMX__ - if (DosGetSharedMem(he_fill_buffer, 3)) { - comerr("DosGetSharedMem() failed.\n"); + if (bits < 9) { + bits = 16; + fprintf(outfp, + _("Warning: sample size forced to 16 bit for MP3 format.\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 */ +#endif /* USE_LAME */ + } else { + usage2(_("Incorrect audio type setting: %3s\n"), audio_type); + } - global.have_forked = 1; - switch_to_realtime_priority(); + if (bulk == -1) + bulk = 0; - 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"); + 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 /* defined(HAVE_FORK_AND_SHAREDMEM) */ + /* + * 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; + } - /* version without fork */ - { - global.have_forked = 0; -#if 0 - if (!global.paranoia_selected) { - error("REAL\n"); - switch_to_realtime_priority(); - } + /* + * 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 - 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 - if (!global.quiet) - fprintf(stderr, "a nonforking version is running...\n"); - nonforked_loop(); - exit_wrapper(NO_ERROR); - /* NOTREACHED */ + global.audio = audiofd; + } else { + global.audio = dup(fileno(stdout)); + } + 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)); + } } -#ifdef USE_PARANOIA - if (global.paranoia_selected) - paranoia_free(global.cdp); -#endif - - return (0); } diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/cd_extra.c cdrtools-3.01a26~trusty/cdda2wav/cd_extra.c --- cdrtools-3.00~trusty~mc3man1/cdda2wav/cd_extra.c 2010-01-09 16:19:31.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/cd_extra.c 2010-12-19 19:06:01.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)cd_extra.c 1.18 10/01/09 Copyright 2000-2001 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling */ +/* @(#)cd_extra.c 1.19 10/12/19 Copyright 2000-2001 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling */ #ifndef lint static const char _sccsid[] = -"@(#)cd_extra.c 1.18 10/01/09 Copyright 2000-2001 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling"; +"@(#)cd_extra.c 1.19 10/12/19 Copyright 2000-2001 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling"; #endif /* @@ -203,7 +203,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; } @@ -374,17 +374,17 @@ case 0x1c: case 0x1d: #ifdef INFOPACKETSTRINGS - fprintf(outfp, "%s %scopyrighted\n", + fprintf(outfp, _("%s %scopyrighted\n"), infopacketID[id], *(Subp + 2) == 0 ? - "not " : ""); + _("not ") : ""); #endif break; case 0x21: - fprintf(outfp, "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(outfp, ", having length: %u\n", + fprintf(outfp, _(", having length: %u\n"), (unsigned) GET_BE_UINT_FROM_CHARP(Subp + 6)); else fputs("\n", outfp); @@ -420,10 +420,10 @@ break; case 0x40: - fprintf(outfp, "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(outfp, ", having length: %u\n", + fprintf(outfp, _(", having length: %u\n"), (unsigned) GET_BE_UINT_FROM_CHARP(Subp + 6)); else fputs("\n", outfp); @@ -431,7 +431,7 @@ #ifdef INFOPACKETSTRINGS case 0x42: - fprintf(outfp, "%s: %d beats per minute\n", + fprintf(outfp, _("%s: %d beats per minute\n"), infopacketID[id], *(Subp + 2)); break; diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/cd_text.c cdrtools-3.01a26~trusty/cdda2wav/cd_text.c --- cdrtools-3.00~trusty~mc3man1/cdda2wav/cd_text.c 2010-01-09 21:24:02.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/cd_text.c 2010-12-19 19:06:01.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)cd_text.c 1.10 10/01/09 Copyright 2000-2001 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling */ +/* @(#)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,7 +237,7 @@ 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.trackperformer[tracknr] == NULL) { @@ -270,7 +270,7 @@ 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) { @@ -303,7 +303,7 @@ 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) { @@ -336,7 +336,7 @@ 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) { @@ -369,7 +369,7 @@ 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) { @@ -402,22 +402,22 @@ 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"); + fprintf(stderr, _("Closed information")); #endif if (tracknr > 0 && tracknr < 100 && global.trackclosed_info[tracknr] == NULL) { @@ -450,7 +450,7 @@ 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); @@ -461,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); @@ -481,83 +481,83 @@ case 0: fprintf(outfp, - "first track is %d, last track is %d\n", + _("first track is %d, last track is %d\n"), c->textdatafield[1], c->textdatafield[2]); if (c->textdatafield[3] & 0x80) { fprintf(outfp, - "Program Area CD Text information available\n"); + _("Program Area CD Text information available\n")); if (c->textdatafield[3] & 0x40) { - fprintf(outfp, "Program Area copy protection available\n"); + fprintf(outfp, _("Program Area copy protection available\n")); } } if (c->textdatafield[3] & 0x07) { fprintf(outfp, - "message information is %scopyrighted\n", + _("message information is %scopyrighted\n"), c->textdatafield[3] & 0x04 ? - "": "not "); + "": _("not ")); fprintf(outfp, - "Names of performer/songwriter/composer/arranger(s) are %scopyrighted\n", + _("Names of performer/songwriter/composer/arranger(s) are %scopyrighted\n"), c->textdatafield[3] & 0x02 ? - "": "not "); + "": _("not ")); fprintf(outfp, - "album and track names are %scopyrighted\n", + _("album and track names are %scopyrighted\n"), c->textdatafield[3] & 0x01 ? - "": "not "); + "": _("not ")); } fprintf(outfp, - "%d packs with album/track names\n", + _("%d packs with album/track names\n"), c->textdatafield[4]); fprintf(outfp, - "%d packs with performer names\n", + _("%d packs with performer names\n"), c->textdatafield[5]); fprintf(outfp, - "%d packs with songwriter names\n", + _("%d packs with songwriter names\n"), c->textdatafield[6]); fprintf(outfp, - "%d packs with composer names\n", + _("%d packs with composer names\n"), c->textdatafield[7]); fprintf(outfp, - "%d packs with arranger names\n", + _("%d packs with arranger names\n"), c->textdatafield[8]); fprintf(outfp, - "%d packs with artist or content provider messages\n", + _("%d packs with artist or content provider messages\n"), c->textdatafield[9]); fprintf(outfp, - "%d packs with disc identification information\n", + _("%d packs with disc identification information\n"), c->textdatafield[10]); fprintf(outfp, - "%d packs with genre identification/information\n", + _("%d packs with genre identification/information\n"), c->textdatafield[11]); break; case 1: fprintf(outfp, - "%d packs with table of contents information\n", + _("%d packs with table of contents information\n"), c->textdatafield[0]); fprintf(outfp, - "%d packs with second table of contents information\n", + _("%d packs with second table of contents information\n"), c->textdatafield[1]); fprintf(outfp, - "%d packs with reserved information\n", + _("%d packs with reserved information\n"), c->textdatafield[2]); fprintf(outfp, - "%d packs with reserved information\n", + _("%d packs with reserved information\n"), c->textdatafield[3]); fprintf(outfp, - "%d packs with reserved information\n", + _("%d packs with reserved information\n"), c->textdatafield[4]); fprintf(outfp, - "%d packs with closed information\n", + _("%d packs with closed information\n"), c->textdatafield[5]); fprintf(outfp, - "%d packs with UPC/EAN ISRC information\n", + _("%d packs with UPC/EAN ISRC information\n"), c->textdatafield[6]); fprintf(outfp, - "%d packs with size information\n", + _("%d packs with size information\n"), c->textdatafield[7]); fprintf(outfp, - "last sequence numbers for blocks 1-8: %d %d %d %d ", + _("last sequence numbers for blocks 1-8: %d %d %d %d "), c->textdatafield[8], c->textdatafield[9], c->textdatafield[10], @@ -571,7 +571,7 @@ c->textdatafield[2], c->textdatafield[3]); fprintf(outfp, - "Language codes for blocks 1-8: %d %d %d %d %d %d %d %d\n", + _("Language codes for blocks 1-8: %d %d %d %d %d %d %d %d\n"), c->textdatafield[4], c->textdatafield[5], c->textdatafield[6], @@ -583,7 +583,7 @@ break; } - fprintf(stderr, "Blocksize"); + fprintf(stderr, _("Blocksize")); dump_binary(c); return (0); @@ -593,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 */ @@ -602,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-3.00~trusty~mc3man1/cdda2wav/configure cdrtools-3.01a26~trusty/cdda2wav/configure --- cdrtools-3.00~trusty~mc3man1/cdda2wav/configure 2010-04-30 20:16:42.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/configure 2014-04-08 15:00:14.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.15-Schily # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Copyright (C) 1998-2011 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.15-Schily" exit 0 ;; -with-* | --with-*) @@ -508,6 +512,11 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$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 +562,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:557: checking host system type" >&5 +echo "configure:566: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -571,7 +580,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,7 +588,7 @@ 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:592: 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 @@ -587,7 +596,7 @@ 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 +if { (eval echo configure:611: \"$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 +621,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:641: 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 @@ -636,7 +645,7 @@ ac_save_LIBS="$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:660: \"$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 +670,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 @@ -680,7 +689,7 @@ 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:693: 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 +704,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:714: \"$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 +721,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:731: \"$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 +738,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:748: \"$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 +766,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:776: 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:786: \"$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 +797,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 +812,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:816: 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:826: \"$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,14 +837,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 @@ -843,17 +852,17 @@ 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:856: 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:866: \"$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,14 +877,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 @@ -1023,7 +1032,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.15-Schily" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/exitcodes.h cdrtools-3.01a26~trusty/cdda2wav/exitcodes.h --- cdrtools-3.00~trusty~mc3man1/cdda2wav/exitcodes.h 2006-05-13 21:02:12.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/cdda2wav/global.h cdrtools-3.01a26~trusty/cdda2wav/global.h --- cdrtools-3.00~trusty~mc3man1/cdda2wav/global.h 2010-01-24 13:38:54.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/global.h 2013-12-24 13:29:06.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)global.h 1.33 10/01/24 Copyright 1998-2004 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling */ +/* @(#)global.h 1.36 13/12/24 Copyright 1998-2004 Heiko Eissfeldt, Copyright 2004-2013 J. Schilling */ /* * Global Variables */ @@ -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. @@ -57,6 +59,22 @@ 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 multiname; /* multiple file names given */ int sh_bits; /* sh_bits: sample bit shift */ int Remainder; @@ -123,6 +141,7 @@ int paranoia_selected; long paranoia_flags; + int paranoia_mode; #ifdef USE_PARANOIA cdrom_paranoia *cdp; @@ -131,7 +150,9 @@ 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; diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/interface.c cdrtools-3.01a26~trusty/cdda2wav/interface.c --- cdrtools-3.00~trusty~mc3man1/cdda2wav/interface.c 2010-04-26 19:25:12.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/interface.c 2014-08-17 13:55:50.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)interface.c 1.72 10/04/26 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling */ +/* @(#)interface.c 1.80 14/08/17 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2006-2014 J. Schilling */ #include "config.h" #ifndef lint static UConst char sccsid[] = -"@(#)interface.c 1.72 10/04/26 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling"; +"@(#)interface.c 1.80 14/08/17 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2006-2014 J. Schilling"; #endif /* * Copyright (C) 1994-1997 Heiko Eissfeldt heiko@colossus.escape.de - * Copyright (c) 2006-2010 J. Schilling + * Copyright (c) 2006-2014 J. Schilling * * Interface module for cdrom drive access * @@ -36,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. @@ -54,10 +56,13 @@ #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 { @@ -224,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); } @@ -249,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(outfp, - "Type: %s, Vendor '%8.8s' Model '%16.16s' Revision '%4.4s' ", + _("Type: %s, Vendor '%8.8s' Model '%16.16s' Revision '%4.4s' "), *p == TYPE_ROM ? "ROM" : "WORM", p+8, p+16, @@ -359,6 +375,7 @@ else global.overlap = 1; ReadCdRom = ReadCddaFallbackMMC; + ReadCdRom_C2 = ReadCddaFallbackMMC_C2; ReadCdRomSub = ReadCddaSubSony; ReadLastAudio = ReadFirstSessionTOCMMC; SelectSpeed = SpeedSelectSCSIMMC; @@ -376,7 +393,7 @@ fprintf(outfp, "MMC-CDDA\n"); /* FALLTHROUGH */ case 0: /* non SCSI-3 cdrom drive */ - if (!global.quiet) fprintf(outfp, "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) || @@ -474,9 +491,17 @@ if (interface == GENERIC_SCSI) { scgp->silent++; while (!wait_unit_ready(scgp, 60)) { + int c; + fprintf(outfp, - "load cdrom please and press enter"); - getchar(); + _("load cdrom please and press enter")); + fflush(outfp); + while ((c = getchar()) != '\n') { + if (c == EOF) + break; + } + if (c == EOF) + exit(DEVICE_ERROR); } scgp->silent--; } @@ -498,7 +523,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); } @@ -514,14 +539,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(outfp, - "wrong interface (cooked_ioctl) for this device (%s)\nset to generic_scsi\n", + _("wrong interface (cooked_ioctl) for this device (%s)\nset to generic_scsi\n"), pdev_name); interface = GENERIC_SCSI; } @@ -547,14 +572,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(outfp, -"cdrom device (%s) is not of type generic SCSI. \ -Setting interface to cooked_ioctl.\n", pdev_name); +_("cdrom device (%s) is not of type generic SCSI. \ +Setting interface to cooked_ioctl.\n"), pdev_name); interface = COOKED_IOCTL; } break; @@ -562,7 +587,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); } @@ -577,18 +602,18 @@ #endif if (interface != COOKED_IOCTL) { fprintf(outfp, -"cdrom device (%s) is not of type generic SCSI. \ -Setting interface to cooked_ioctl.\n", pdev_name); +_("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(outfp, - "\nW: The cooked_ioctl interface is functionally very limited!!\n"); + _("\nW: The cooked_ioctl interface is functionally very limited!!\n")); #if defined(__linux__) fprintf(outfp, - "\nW: For good sampling quality simply use the generic SCSI interface!\n" - "For example dev=1,0,0\n"); + _("\nW: For good sampling quality simply use the generic SCSI interface!\n" + "For example dev=1,0,0\n")); #endif } @@ -633,7 +658,7 @@ 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); @@ -647,7 +672,8 @@ needroot(0); needgroup(0); - priv_on(); + 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 @@ -683,6 +709,12 @@ (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; @@ -693,7 +725,8 @@ * mlockall(MCL_FUTURE). */ init_scsibuf(scgp, global.bufsize); - priv_off(); + if (global.issetuid || global.uid != 0) + priv_off(); dontneedgroup(); dontneedroot(); @@ -725,7 +758,7 @@ dontneedgroup(); if (retval < 0) { - errmsg("Cannot open '%s'.\n", pdev_name); + errmsg(_("Cannot open '%s'.\n"), pdev_name); exit(DEVICEOPEN_ERROR); } @@ -733,7 +766,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); } @@ -745,7 +778,7 @@ (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 @@ -767,32 +800,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); } @@ -803,7 +837,7 @@ { int ntarget; - fprintf(outfp, "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); @@ -822,19 +856,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"); + 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] == ':'?"":":"):""); } - fprintf(outfp, "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); @@ -868,7 +902,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); } @@ -1129,14 +1163,14 @@ */ SubQbuffer = malloc(48); /* assumes sufficient aligned addresses */ if (!bufferTOC || !SubQbuffer) { - errmsg("Too low on memory. Giving up.\n"); + 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(); @@ -1155,7 +1189,7 @@ 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 %d to 2048\n"), sector_size); } } else { @@ -1172,13 +1206,13 @@ _scgp = malloc(sizeof (* _scgp)); if (_scgp == NULL) { FatalError(geterrno(), - "No memory for SCSI structure.\n"); + _("No memory for SCSI structure.\n")); } _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 */ @@ -1192,62 +1226,6 @@ } } -#include - -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); -#endif -} - -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); -#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 -} - - -#include -#ifdef HAVE_POLL -#include -#endif - EXPORT int poll_in() { @@ -1270,7 +1248,7 @@ tv.tv_usec = 0; return (select(1, &rd, NULL, NULL, &tv)); #else - comerrno(EX_BAD, "Poll/Select not available.\n"); + comerrno(EX_BAD, _("Poll/Select not available.\n")); #endif #endif } diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/interface.h cdrtools-3.01a26~trusty/cdda2wav/interface.h --- cdrtools-3.00~trusty~mc3man1/cdda2wav/interface.h 2009-04-19 12:19:50.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/interface.h 2013-12-26 17:45:18.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)interface.h 1.23 09/04/19 Copyright 1998-2001 Heiko Eissfeldt, Copyright 2005-2009 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-2008 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, @@ -137,10 +148,6 @@ 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)); /* @@ -151,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-3.00~trusty~mc3man1/cdda2wav/ioctl.c cdrtools-3.01a26~trusty/cdda2wav/ioctl.c --- cdrtools-3.00~trusty~mc3man1/cdda2wav/ioctl.c 2009-08-07 21:09:46.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/ioctl.c 2010-12-19 19:06:01.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)ioctl.c 1.38 09/08/07 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2006-2009 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 UConst char sccsid[] = -"@(#)ioctl.c 1.38 09/08/07 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2006-2009 J. Schilling"; +"@(#)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-2009 J. Schilling + * Copyright (c) 2006-2010 J. Schilling * * Ioctl interface module for cdrom drive access * @@ -39,6 +39,7 @@ #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-3.00~trusty~mc3man1/cdda2wav/ioctl.h cdrtools-3.01a26~trusty/cdda2wav/ioctl.h --- cdrtools-3.00~trusty~mc3man1/cdda2wav/ioctl.h 2000-01-02 16:30:38.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/cdda2wav/Makefile cdrtools-3.01a26~trusty/cdda2wav/Makefile --- cdrtools-3.00~trusty~mc3man1/cdda2wav/Makefile 2010-02-10 23:21:25.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/Makefile 2013-04-21 18:13:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile 1.26 10/02/11 +#ident @(#)Makefile 1.29 13/04/21 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -7,9 +7,9 @@ ########################################################################### all: -all clean depend config install: install-sh scsi_scan.c scsi_cdr.c +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: +install-sh scsi_scan.c scsi_cdr.c cd_misc.c priv.c: @echo " ==> MAKING SYMLINKS in ." && sh ./MKLINKS ########################################################################### @@ -22,23 +22,30 @@ 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 setuid.c ringbuff.c \ sndconfig.c scsi_cmds.c aiff.c aifc.c \ scsi_cdr.c cd_misc.c ioctl.c base64.c \ - parse.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 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 mmsystem.h cd_text.c cd_extra.c \ + base64.h mmsystem.h cd_text.c cd_extra.c ioctl.h \ parse.h version.h -LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lparanoia -lcdrdeflt -ldeflt -lmdigest -lschily $(SCSILIB) $(EXTRALIB) $(LIB_SOCKET) +# +# 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 diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/MKLINKS cdrtools-3.01a26~trusty/cdda2wav/MKLINKS --- cdrtools-3.00~trusty~mc3man1/cdda2wav/MKLINKS 2009-02-24 21:22:41.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/MKLINKS 2013-04-21 18:13:20.000000000 +0000 @@ -1,10 +1,10 @@ #!/bin/sh ########################################################################### -#ident "@(#)MKLINKS 1.4 09/02/24 " +#ident "@(#)MKLINKS 1.7 13/04/21 " ########################################################################### -# Written 2008 by J. Schilling +# Written 2008-2011 by J. Schilling ########################################################################### -# Copyright (c) 2008 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 @@ -17,17 +17,24 @@ # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### symlink="ln -s" -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 -rm -f xxzzy.123 xxzzy.345 +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 . diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/mycdrom.h cdrtools-3.01a26~trusty/cdda2wav/mycdrom.h --- cdrtools-3.00~trusty~mc3man1/cdda2wav/mycdrom.h 2007-07-28 19:12:38.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/cdda2wav/parse.c cdrtools-3.01a26~trusty/cdda2wav/parse.c --- cdrtools-3.00~trusty~mc3man1/cdda2wav/parse.c 2009-12-19 22:34:33.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/parse.c 2010-12-19 19:06:01.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)parse.c 1.9 09/12/19 Copyright 2001-2009 J. Schilling */ +/* @(#)parse.c 1.10 10/12/19 Copyright 2001-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)parse.c 1.9 09/12/19 Copyright 2001-2009 J. Schilling"; + "@(#)parse.c 1.10 10/12/19 Copyright 2001-2010 J. Schilling"; #endif /* * Interactive command parser for cdda2wav * - * Copyright (c) 2001-2009 J. Schilling + * Copyright (c) 2001-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -40,6 +40,7 @@ #include #include #include +#include #include "toc.h" @@ -172,19 +173,19 @@ if (streql(p, "sectors")) { p = nextword(); if (*astol(p, &l) != '\0') { - pabort(E_BAD, "Not a number '%s'", p); + 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); + pabort(E_BAD, _("Not a number '%s'"), p); } if (l < FirstAudioTrack() || l > LastAudioTrack()) - pabort(E_BAD, "Bad track number '%s'", p); + pabort(E_BAD, _("Bad track number '%s'"), p); *lp = Get_StartSector(l); } else { - pabort(E_BAD, "Bad 'read' parameter '%s'", p); + pabort(E_BAD, _("Bad 'read' parameter '%s'"), p); } wok(); break; @@ -196,14 +197,14 @@ wok(); goto again; default: - pabort(E_NOTFOUND, "Unknown command '%s'", p); + pabort(E_NOTFOUND, _("Unknown command '%s'"), p); return (0); } checkextra(); return (0); } /* checkextra();*/ - pabort(E_NOTFOUND, "Unknown command '%s'", p); + pabort(E_NOTFOUND, _("Unknown command '%s'"), p); return (0); } @@ -263,7 +264,7 @@ } f = fileopen(name, "r"); if (f == NULL) - comerr("Cannot open '%s'.\n", name); + comerr(_("Cannot open '%s'.\n"), name); fname = name; return (f); @@ -406,7 +407,7 @@ nlinep = getnextitem(delim); if ((olinep == nlinep) || (*nlinep == '\0')) - pabort(E_BAD, "Missing text"); + pabort(E_BAD, _("Missing text")); return (nlinep); } @@ -448,7 +449,7 @@ checkextra() { if (peekword() < lineend()) - pabort(E_BAD, "Extra text '%s'", peekword()); + pabort(E_BAD, _("Extra text '%s'"), peekword()); } /* VARARGS1 */ @@ -479,7 +480,7 @@ if (ep->num >= 0) { error("%d %s. ", ep->num, ep->name); } - errmsgno(EX_BAD, "%r on line %d in '%s'.\n", + errmsgno(EX_BAD, _("%r on line %d in '%s'.\n"), fmt, args, lineno, fname); va_end(args); siglongjmp(jmp.jb, 1); @@ -494,14 +495,14 @@ 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"); + 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-3.00~trusty~mc3man1/cdda2wav/resample.c cdrtools-3.01a26~trusty/cdda2wav/resample.c --- cdrtools-3.00~trusty~mc3man1/cdda2wav/resample.c 2009-08-27 08:56:41.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/resample.c 2010-12-19 19:06:01.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)resample.c 1.33 09/08/27 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2009 J. Schilling */ +/* @(#)resample.c 1.34 10/12/19 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling */ #include "config.h" #ifndef lint static UConst char sccsid[] = -"@(#)resample.c 1.33 09/08/27 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2009 J. Schilling"; +"@(#)resample.c 1.34 10/12/19 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling"; #endif /* * resampling module @@ -43,6 +43,7 @@ #include #include #include +#include #include @@ -109,7 +110,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); } @@ -305,7 +306,7 @@ fprintf(stderr, "%d\n", retval-(newbuf+global.overlap*CD_FRAMESIZE_RAW)); } else { - fprintf(stderr, "no match\n"); + fprintf(stderr, _("no match\n")); } #endif } @@ -793,7 +794,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); } } @@ -1178,7 +1179,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-3.00~trusty~mc3man1/cdda2wav/ringbuff.c cdrtools-3.01a26~trusty/cdda2wav/ringbuff.c --- cdrtools-3.00~trusty~mc3man1/cdda2wav/ringbuff.c 2010-01-07 19:46:43.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/ringbuff.c 2010-12-19 19:06:01.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)ringbuff.c 1.23 10/01/07 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2010 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 UConst char sccsid[] = -"@(#)ringbuff.c 1.23 10/01/07 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling"; +"@(#)ringbuff.c 1.24 10/12/19 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling"; #endif /* * Ringbuffer handling @@ -26,6 +26,7 @@ #include #include #include +#include #if defined(HAVE_SEMGET) && defined(USE_SEMAPHORES) #include @@ -77,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 @@ -197,7 +198,7 @@ #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 @@ -210,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 @@ -239,7 +240,7 @@ #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 @@ -253,7 +254,7 @@ /* * semaphore operation failed. */ - errmsg("Parent writer sem request failed.\n"); + errmsg(_("Parent writer sem request failed.\n")); return ((myringbuff *)NULL); } diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/scsi_cmds.c cdrtools-3.01a26~trusty/cdda2wav/scsi_cmds.c --- cdrtools-3.00~trusty~mc3man1/cdda2wav/scsi_cmds.c 2010-05-24 10:17:32.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/scsi_cmds.c 2013-12-24 13:29:06.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)scsi_cmds.c 1.51 10/05/24 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling */ +/* @(#)scsi_cmds.c 1.53 13/12/24 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2004-2013 J. Schilling */ #include "config.h" #ifndef lint static UConst char sccsid[] = -"@(#)scsi_cmds.c 1.51 10/05/24 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling"; +"@(#)scsi_cmds.c 1.53 13/12/24 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2004-2013 J. Schilling"; #endif /* * file for all SCSI commands @@ -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. @@ -31,6 +33,7 @@ #include #include #include +#include #include @@ -130,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); } @@ -140,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 !!! @@ -194,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); } @@ -273,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")); } @@ -318,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)"; @@ -326,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; @@ -359,14 +362,14 @@ scgp->silent++; if (scgp->verbose) { fprintf(stderr, - "\nRead TOC CD Text data (length %d)...", (int)datalength); + _("\nRead TOC CD Text data (length %d)..."), (int)datalength); } scgp->cmdname = "read toc data (text)"; if (scg_cmd(scgp) < 0) { 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); @@ -383,12 +386,12 @@ /*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(global.buf, global.bufsize, '\0'); read_ = fread(global.buf, 1, global.bufsize, fp); - fprintf(stderr, "read %d bytes. sizeof(buffer)=%u\n", + 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); @@ -428,14 +431,14 @@ 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) { 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--; @@ -581,7 +584,7 @@ #ifdef WARN_FULLTOC if (ep->tno != 0) { - fprintf(stderr, "entry %d, tno is not 0: %d!\n", + fprintf(stderr, _("entry %d, tno is not 0: %d!\n"), i, ep->tno); } #endif @@ -606,7 +609,7 @@ #ifdef WARN_FULLTOC else { fprintf(stderr, - "entry %d, session anomaly %d != %d!\n", + _("entry %d, session anomaly %d != %d!\n"), i, session+1, ep->session); } /* @@ -614,7 +617,7 @@ */ if (0x10 != (ep->adrctl & 0x10)) { fprintf(stderr, - "entry %d, incorrect adrctl field %x!\n", + _("entry %d, incorrect adrctl field %x!\n"), i, ep->adrctl); } #endif @@ -628,7 +631,7 @@ #ifdef WARN_FULLTOC else fprintf(stderr, -"entry %d, session %d: start tracknumber anomaly: %d <= %d,%d(last)!\n", +_("entry %d, session %d: start tracknumber anomaly: %d <= %d,%d(last)!\n"), i, session, ep->pmins, bufferTOC[2], bufferTOC[3]); #endif @@ -641,7 +644,7 @@ */ if (session != ep->session) { fprintf(stderr, - "entry %d, session anomaly %d != %d!\n", + _("entry %d, session anomaly %d != %d!\n"), i, session, ep->session); } @@ -650,7 +653,7 @@ */ if (0x10 != (ep->adrctl & 0x10)) { fprintf(stderr, - "entry %d, incorrect adrctl field %x!\n", + _("entry %d, incorrect adrctl field %x!\n"), i, ep->adrctl); } #endif @@ -664,7 +667,7 @@ #ifdef WARN_FULLTOC else fprintf(stderr, -"entry %d, session %d: end tracknumber anomaly: %d <= %d,%d(last)!\n", +_("entry %d, session %d: end tracknumber anomaly: %d <= %d,%d(last)!\n"), i, session, ep->pmins, bufferTOC[2], bufferTOC[3]); #endif @@ -677,7 +680,7 @@ */ if (session != ep->session) { fprintf(stderr, - "entry %d, session anomaly %d != %d!\n", + _("entry %d, session anomaly %d != %d!\n"), i, session, ep->session); } @@ -686,7 +689,7 @@ */ if (0x10 != (ep->adrctl & 0x10)) { fprintf(stderr, - "entry %d, incorrect adrctl field %x!\n", + _("entry %d, incorrect adrctl field %x!\n"), i, ep->adrctl); } #endif @@ -708,7 +711,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 } @@ -721,7 +724,7 @@ */ if (session != ep->session) { fprintf(stderr, - "entry %d, session anomaly %d != %d!\n", + _("entry %d, session anomaly %d != %d!\n"), i, session, ep->session); } @@ -730,7 +733,7 @@ */ if (0x50 != (ep->adrctl & 0x50)) { fprintf(stderr, - "entry %d, incorrect adrctl field %x!\n", + _("entry %d, incorrect adrctl field %x!\n"), i, ep->adrctl); } @@ -739,7 +742,7 @@ */ if (lba((struct msf_address *)&ep->mins) < 6750 + leadout_start) { fprintf(stderr, -"entry %d, next program area %u < leadout_start + 6750 = %u!\n", +_("entry %d, next program area %u < leadout_start + 6750 = %u!\n"), i, lba((struct msf_address *)&ep->mins), 6750 + leadout_start); } @@ -750,7 +753,7 @@ 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", +_("entry %d, max leadout_start %u != last max_leadout_start %u!\n"), i, dvd_lba((struct zmsf_address *)&ep->zero), max_leadout); } @@ -776,7 +779,7 @@ if (session != ep->session) { #ifdef WARN_FULLTOC fprintf(stderr, - "entry %d, session anomaly %d != %d!\n", + _("entry %d, session anomaly %d != %d!\n"), i, session, ep->session); #endif continue; @@ -792,7 +795,7 @@ ep->point > bufferTOC[3]) { #ifdef WARN_FULLTOC fprintf(stderr, - "entry %d, track number anomaly %d - %d - %d!\n", + _("entry %d, track number anomaly %d - %d - %d!\n"), i, bufferTOC[2], ep->point, bufferTOC[3]); #endif @@ -812,7 +815,7 @@ trackstart >= leadout_start) { #ifdef WARN_FULLTOC fprintf(stderr, -"entry %d, track %d start position anomaly %d - %d - %d!\n", +_("entry %d, track %d start position anomaly %d - %d - %d!\n"), i, ep->point, last_start, trackstart, leadout_start); @@ -1000,7 +1003,7 @@ scgp->silent++; if (scgp->verbose) - fprintf(stderr, "\nRead Full TOC MMC..."); + fprintf(stderr, _("\nRead Full TOC MMC...")); scgp->cmdname = "read full toc mmc"; @@ -1009,7 +1012,7 @@ 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 @@ -1128,7 +1131,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) @@ -1136,7 +1139,7 @@ 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); @@ -1162,7 +1165,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) */ @@ -1221,14 +1224,14 @@ 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); @@ -1295,7 +1298,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"; @@ -1361,7 +1364,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"; @@ -1401,7 +1404,7 @@ g5_cdblen(&scmd->cdb.g5_cdb, SectorBurstVal); if (scgp->verbose) - fprintf(stderr, "\nReadSony12 CDDA..."); + fprintf(stderr, _("\nReadSony12 CDDA...")); scgp->cmdname = "Read12"; @@ -1422,6 +1425,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_RAW); +} + +/* + * 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). @@ -1448,7 +1495,7 @@ g5_cdblen(&scmd->cdb.g5_cdb, SectorBurstVal); if (scgp->verbose) - fprintf(stderr, "\nReadMatsushita12 CDDA..."); + fprintf(stderr, _("\nReadMatsushita12 CDDA...")); scgp->cmdname = "Read12Matsushita"; @@ -1490,7 +1537,7 @@ 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"; @@ -1507,6 +1554,53 @@ 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"; + + 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_RAW); +} + int ReadCddaFallbackMMC(scgp, p, lSector, SectorBurstVal) SCSI *scgp; @@ -1536,9 +1630,37 @@ 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); +} + /* * 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 * @@ -1568,12 +1690,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")); } /* @@ -1629,7 +1751,7 @@ default: fprintf(stderr, - "ReadSubQSCSI: unknown format %d\n", sq_format); + _("ReadSubQSCSI: unknown format %d\n"), sq_format); return (NULL); } @@ -1648,7 +1770,7 @@ g1_cdblen(&scmd->cdb.g1_cdb, resp_size); if (scgp->verbose) - fprintf(stderr, "\nRead Subchannel..."); + fprintf(stderr, _("\nRead Subchannel...")); scgp->cmdname = "Read Subchannel"; @@ -1701,7 +1823,7 @@ g5_cdblen(&scmd->cdb.g5_cdb, SectorBurstVal); if (scgp->verbose) - fprintf(stderr, "\nReadSony12 CDDA + SubChannels..."); + fprintf(stderr, _("\nReadSony12 CDDA + SubChannels...")); scgp->cmdname = "Read12SubChannelsSony"; @@ -1744,7 +1866,7 @@ 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"; @@ -1805,7 +1927,7 @@ 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"; @@ -1904,7 +2026,7 @@ 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++; /* @@ -1912,7 +2034,7 @@ */ if ((retval = mode_select(scgp, mode, 7, 0, scgp->inq->data_format >= 2)) < 0) - fprintf(stderr, "speed select Toshiba failed\n"); + fprintf(stderr, _("speed select Toshiba failed\n")); scgp->silent--; } @@ -1949,7 +2071,7 @@ g1_cdblen(&scmd->cdb.g1_cdb, 12); if (scgp->verbose) - fprintf(stderr, "\nspeed select NEC..."); + fprintf(stderr, _("\nspeed select NEC...")); /* * do the scsi cmd @@ -1957,7 +2079,7 @@ scgp->cmdname = "speed select NEC"; if ((retval = scg_cmd(scgp)) < 0) - errmsgno(EX_BAD, "Speed select NEC failed.\n"); + errmsgno(EX_BAD, _("Speed select NEC failed.\n")); } void @@ -1983,13 +2105,13 @@ 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"); + errmsgno(EX_BAD, _("Speed select PhilipsCDD2600 failed.\n")); } void @@ -2010,14 +2132,14 @@ 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"); + errmsgno(EX_BAD, _("Speed select Sony failed.\n")); scgp->silent--; } @@ -2039,13 +2161,13 @@ 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"); + errmsgno(EX_BAD, _("Speed select Yamaha failed.\n")); } void @@ -2071,7 +2193,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"; @@ -2085,7 +2207,7 @@ */ } else { scg_printerr(scgp); - errmsgno(EX_BAD, "Speed select MMC failed.\n"); + errmsgno(EX_BAD, _("Speed select MMC failed.\n")); } } scgp->silent--; @@ -2105,7 +2227,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); } @@ -2133,7 +2255,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); @@ -2171,7 +2293,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"; @@ -2211,7 +2333,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 @@ -2245,7 +2367,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 @@ -2266,12 +2388,12 @@ { 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-3.00~trusty~mc3man1/cdda2wav/scsi_cmds.h cdrtools-3.01a26~trusty/cdda2wav/scsi_cmds.h --- cdrtools-3.00~trusty~mc3man1/cdda2wav/scsi_cmds.h 2009-01-22 23:58:14.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/scsi_cmds.h 2013-12-24 13:29:06.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)scsi_cmds.h 1.17 09/01/23 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2004-2009 J. Schilling */ +/* @(#)scsi_cmds.h 1.18 13/12/24 Copyright 1998,1999 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. @@ -43,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)); @@ -61,6 +69,9 @@ 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 ReadCddaSubSony __PR((SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal)); diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/semshm.c cdrtools-3.01a26~trusty/cdda2wav/semshm.c --- cdrtools-3.00~trusty~mc3man1/cdda2wav/semshm.c 2010-01-07 19:40:43.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/semshm.c 2013-04-28 11:59:31.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)semshm.c 1.30 10/01/07 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling */ +/* @(#)semshm.c 1.32 13/04/28 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2004-2013 J. Schilling */ #include "config.h" #ifndef lint static UConst char sccsid[] = -"@(#)semshm.c 1.30 10/01/07 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling"; +"@(#)semshm.c 1.32 13/04/28 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2004-2013 J. Schilling"; #endif #define IPCTST @@ -66,7 +66,7 @@ #include #include #include -#include +#include #if defined(HAVE_SEMGET) && defined(USE_SEMAPHORES) #include @@ -85,6 +85,7 @@ #include #endif #endif +#include #include @@ -135,7 +136,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); @@ -164,7 +165,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); @@ -191,7 +192,7 @@ 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); @@ -220,11 +221,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); } } @@ -367,7 +368,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); } @@ -386,12 +387,12 @@ *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); } @@ -471,7 +472,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); @@ -484,7 +485,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); @@ -516,7 +517,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; @@ -553,7 +554,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; @@ -573,7 +574,7 @@ */ sem_id = seminstall(IPC_PRIVATE, 2); if (sem_id == -1) { - errmsg("Seminstall failed.\n"); + errmsg(_("Seminstall failed.\n")); exit(SEMAPHORE_ERROR); } @@ -581,7 +582,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-3.00~trusty~mc3man1/cdda2wav/setuid.c cdrtools-3.01a26~trusty/cdda2wav/setuid.c --- cdrtools-3.00~trusty~mc3man1/cdda2wav/setuid.c 2009-07-10 20:36:47.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/setuid.c 2011-08-03 21:08:06.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)setuid.c 1.19 09/07/10 Copyright 1998,1999,2004 Heiko Eissfeldt, Copyright 2004-2009 J. Schilling */ +/* @(#)setuid.c 1.22 11/08/03 Copyright 1998,1999,2004 Heiko Eissfeldt, Copyright 2004-2011 J. Schilling */ #include "config.h" #ifndef lint static UConst char sccsid[] = -"@(#)setuid.c 1.19 09/07/10 Copyright 1998,1999,2004 Heiko Eissfeldt, Copyright 2004-2009 J. Schilling"; +"@(#)setuid.c 1.22 11/08/03 Copyright 1998,1999,2004 Heiko Eissfeldt, Copyright 2004-2011 J. Schilling"; #endif /* @@ -42,6 +42,7 @@ #include #include #include +#include #include "exitcodes.h" #include "setuid.h" @@ -65,14 +66,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; @@ -104,13 +107,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); } @@ -119,19 +122,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 @@ -155,7 +158,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) @@ -165,20 +168,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", @@ -202,13 +205,13 @@ 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) { #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 @@ -218,7 +221,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 @@ -226,7 +229,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", @@ -258,7 +261,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); } @@ -267,20 +270,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); } } @@ -298,27 +301,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 @@ -342,13 +345,13 @@ 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) { #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 @@ -358,7 +361,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 @@ -366,7 +369,7 @@ #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")); exit(PERM_ERROR); } effective_gid = real_gid; diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/sndconfig.c cdrtools-3.01a26~trusty/cdda2wav/sndconfig.c --- cdrtools-3.00~trusty~mc3man1/cdda2wav/sndconfig.c 2009-11-29 22:07:37.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/sndconfig.c 2013-07-30 19:37:26.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)sndconfig.c 1.35 09/11/29 Copyright 1998-2004 Heiko Eissfeldt, Copyright 2004-2009 J. Schilling */ +/* @(#)sndconfig.c 1.42 13/07/30 Copyright 1998-2004 Heiko Eissfeldt, Copyright 2004-2013 J. Schilling */ #include "config.h" #ifndef lint static UConst char sccsid[] = -"@(#)sndconfig.c 1.35 09/11/29 Copyright 1998-2004 Heiko Eissfeldt, Copyright 2004-2009 J. Schilling"; +"@(#)sndconfig.c 1.42 13/07/30 Copyright 1998-2004 Heiko Eissfeldt, Copyright 2004-2013 J. Schilling"; #endif /* @@ -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. @@ -29,6 +31,7 @@ #include #include #include +#include /* soundcard setup */ @@ -58,8 +61,8 @@ #include "sndconfig.h" #ifdef ECHO_TO_SOUNDCARD -# if defined(__CYGWIN32__) || defined(__MINGW32__) -# include +# if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER) +# include # include "mmsystem.h" # endif @@ -95,11 +98,13 @@ return (0); } -# if defined(__CYGWIN32__) || defined(__MINGW32__) +# if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER) 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)); @@ -116,7 +121,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); } @@ -125,14 +130,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; } @@ -140,12 +145,30 @@ (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); } + +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 CYGWIN */ #endif /* defined ECHO_TO_SOUNDCARD */ @@ -174,7 +197,7 @@ if (global.echo) { # if defined(HAVE_OSS) && HAVE_OSS == 1 if (open_snd_device() != 0) { - errmsg("Cannot open sound device '%s'.\n", snd_device); + errmsg(_("Cannot open sound device '%s'.\n"), snd_device); global.echo = 0; } else { /* @@ -190,13 +213,13 @@ if (ioctl(global.soundcard_fd, SNDCTL_DSP_GETBLKSIZE, &dummy) == -1) { - errmsg("Cannot get blocksize for %s.\n", + errmsg(_("Cannot get blocksize for %s.\n"), snd_device); global.echo = 0; } if (ioctl(global.soundcard_fd, SNDCTL_DSP_SYNC, NULL) == -1) { - errmsg("Cannot sync for %s.\n", + errmsg(_("Cannot sync for %s.\n"), snd_device); global.echo = 0; } @@ -204,7 +227,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; } @@ -216,12 +239,12 @@ */ if (ioctl(global.soundcard_fd, SNDCTL_DSP_GETFMTS, &mask) == -1) { - errmsg("Fatal error in ioctl(SNDCTL_DSP_GETFMTS).\n"); + 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; @@ -230,7 +253,7 @@ } if (ioctl(global.soundcard_fd, SNDCTL_DSP_SETFMT, &myformat) == -1) { - errmsg("Cannot set %d bits/sample for %s.\n", + errmsg(_("Cannot set %d bits/sample for %s.\n"), bits, snd_device); global.echo = 0; } @@ -241,14 +264,14 @@ if (stereo && ioctl(global.soundcard_fd, SNDCTL_DSP_STEREO, &stereo) == -1) { - errmsg("Cannot set stereo mode for %s.\n", + errmsg(_("Cannot set stereo mode for %s.\n"), snd_device); stereo = 0; } if (!stereo && ioctl(global.soundcard_fd, SNDCTL_DSP_STEREO, &stereo) == -1) { - errmsg("Cannot set mono mode for %s.\n", + errmsg(_("Cannot set mono mode for %s.\n"), snd_device); global.echo = 0; } @@ -258,14 +281,14 @@ */ if (ioctl(global.soundcard_fd, SNDCTL_DSP_SPEED, &garbled_rate) == -1) { - errmsg("Cannot set rate %d.%2d Hz for %s.\n", + 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); } } @@ -279,12 +302,12 @@ */ 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; @@ -295,19 +318,19 @@ 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 errmsgno(EX_BAD, - "Cannot init sound device with 44.1 KHz sample rate on %s (sun compatible).\n", + _("Cannot init sound device with 44.1 KHz sample rate on %s (sun compatible).\n"), snd_device); global.echo = 0; # endif } # else /* SUN audio */ -# if defined(__CYGWIN32__) || defined(__MINGW32__) +# if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER) /* * Windows sound info */ @@ -315,7 +338,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); } @@ -325,7 +348,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); } @@ -339,15 +362,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); } @@ -365,8 +389,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); } @@ -378,7 +403,7 @@ waveOutGetErrorText(mmres, erstr, sizeof (erstr)); errmsgno(EX_BAD, - "soundcard prepare error: %s!\n", + _("soundcard prepare error: %s!\n"), erstr); return (1); } @@ -427,7 +452,7 @@ /* * no sound */ - errmsgno(EX_BAD, "No sound devices available!\n"); + errmsgno(EX_BAD, _("No sound devices available!\n")); global.echo = 0; return (1); } @@ -456,7 +481,7 @@ MCI_GENERIC_PARMS mciGenericParms; errmsgno(EX_BAD, - "Soundcard capabilities are not sufficient!\n"); + _("Soundcard capabilities are not sufficient!\n")); global.echo = 0; /* * close @@ -480,14 +505,14 @@ rtn = snd_pcm_open_preferred(&pcm_handle, &card, &dev, SND_PCM_OPEN_PLAYBACK); if (rtn < 0) { - errmsg("Error opening sound device.\n"); + 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"); + errmsg(_("Error opening sound device.\n")); return (1); } } @@ -496,7 +521,7 @@ pi.channel = SND_PCM_CHANNEL_PLAYBACK; rtn = snd_pcm_plugin_info(pcm_handle, &pi); if (rtn < 0) { - errmsg("Snd_pcm_plugin_info failed: '%s'.\n", + errmsg(_("Snd_pcm_plugin_info failed: '%s'.\n"), snd_strerror(rtn)); return (1); } @@ -522,7 +547,7 @@ rtn = snd_pcm_plugin_params(pcm_handle, &pp); if (rtn < 0) { - errmsg("Snd_pcm_plugin_params failed: '%s'.\n", + errmsg(_("Snd_pcm_plugin_params failed: '%s'.\n"), snd_strerror(rtn)); return (1); } @@ -530,7 +555,7 @@ rtn = snd_pcm_plugin_prepare(pcm_handle, SND_PCM_CHANNEL_PLAYBACK); if (rtn < 0) { - errmsg("Snd_pcm_plugin_prepare failed: '%s'.\n", + errmsg(_("Snd_pcm_plugin_prepare failed: '%s'.\n"), snd_strerror(rtn)); return (1); } @@ -551,7 +576,7 @@ int open_snd_device() { -#if defined ECHO_TO_SOUNDCARD && !defined __CYGWIN32__ && !defined __MINGW32__ && !defined __EMX__ +#if defined ECHO_TO_SOUNDCARD && !defined __CYGWIN32__ && !defined __CYGWIN__ && !defined __MINGW32__ && !defined __EMX__ #if defined(F_GETFL) && defined(F_SETFL) && defined(O_NONBLOCK) int fl; #endif @@ -574,7 +599,7 @@ return (global.soundcard_fd < 0); -#else /* defined ECHO_TO_SOUNDCARD && !defined __CYGWIN32__ && !defined __MINGW32__ && !defined __EMX__ */ +#else /* defined ECHO_TO_SOUNDCARD && !defined __CYGWIN32__ && !defined __CYGWIN32__ && !defined __MINGW32__ && !defined __EMX__ */ return (0); #endif } @@ -586,8 +611,9 @@ return (0); #else -# if defined(__CYGWIN32__) || defined(__MINGW32__) +# if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER) waveOutReset(0); +CloseHandle(waveOutEvent); return (waveOutClose(DeviceID)); # else /* !Cygwin32 */ @@ -620,18 +646,23 @@ { int result = 0; #ifdef ECHO_TO_SOUNDCARD -#if defined(__CYGWIN32__) || defined(__MINGW32__) +#if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER) 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: %s!\n"), erstr); return (1); } if (++lastwav >= WAVEHDRS) @@ -650,7 +681,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: %s!\n"), erstr); return (1); } result = 0; @@ -664,9 +695,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; @@ -678,13 +710,14 @@ 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; } @@ -694,7 +727,7 @@ wrote = write(global.soundcard_fd, buffer, towrite); #endif if (wrote <= 0) { - errmsg("Can't write audio.\n"); + errmsg(_("Can't write audio.\n")); result = 1; goto outside_loop; } else { diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/sun.c cdrtools-3.01a26~trusty/cdda2wav/sun.c --- cdrtools-3.00~trusty~mc3man1/cdda2wav/sun.c 2010-01-12 21:41:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/sun.c 2013-04-28 11:57:47.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)sun.c 1.14 10/01/12 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2010 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 UConst char sccsid[] = -"@(#)sun.c 1.14 10/01/12 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling"; +"@(#)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-2010 J. Schilling + * Copyright (c) 2006-2013 J. Schilling * * definitions for sun pcm output */ @@ -61,12 +61,12 @@ 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); diff -Nru cdrtools-3.00~trusty~mc3man1/cdda2wav/toc.c cdrtools-3.01a26~trusty/cdda2wav/toc.c --- cdrtools-3.00~trusty~mc3man1/cdda2wav/toc.c 2010-02-10 22:35:50.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdda2wav/toc.c 2013-11-18 20:36:27.000000000 +0000 @@ -1,12 +1,12 @@ -/* @(#)toc.c 1.96 10/02/10 Copyright 1998-2003 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling */ +/* @(#)toc.c 1.99 13/11/18 Copyright 1998-2003 Heiko Eissfeldt, Copyright 2004-2013 J. Schilling */ #include "config.h" #ifndef lint static UConst char sccsid[] = -"@(#)toc.c 1.96 10/02/10 Copyright 1998-2003 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling"; +"@(#)toc.c 1.99 13/11/18 Copyright 1998-2003 Heiko Eissfeldt, Copyright 2004-2013 J. Schilling"; #endif /* * CDDA2WAV (C) Heiko Eissfeldt heiko@hexco.de - * Copyright (c) 2004-2010 J. Schilling + * Copyright (c) 2004-2013 J. Schilling * * The CDDB routines are compatible to cddbd (C) Ti Kan and Steve Scherf */ @@ -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. @@ -34,19 +36,23 @@ #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" @@ -59,24 +65,14 @@ #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 -#include -#endif int have_CD_text; int have_multisession; @@ -85,6 +81,12 @@ struct iterator; +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)); @@ -147,7 +149,7 @@ int p_num; { if (global.quiet == 0) { - fprintf(outfp, "\ntrack: %.2d, ", p_num); fflush(outfp); + fprintf(outfp, _("\ntrack: %.2d, "), p_num); fflush(outfp); } g_track = (unsigned char) p_num; } @@ -161,7 +163,7 @@ int p_num; { if (global.quiet == 0) { - fprintf(outfp, "index: %.2d\n", p_num); fflush(outfp); + fprintf(outfp, _("index: %.2d\n"), p_num); fflush(outfp); } g_index = (unsigned char) p_num; } @@ -177,7 +179,7 @@ int p_frm; { if (global.quiet == 0) { - fprintf(outfp, "time: %.2d:%.2d.%.2d\r", p_min, p_sec, p_frm); + fprintf(outfp, _("time: %.2d:%.2d.%.2d\r"), p_min, p_sec, p_frm); fflush(outfp); } } @@ -226,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); } @@ -371,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(outfp, - "current ioctl multisession_offset = %u\n", + _("current ioctl multisession_offset = %u\n"), ms_str.addr.lba); #endif if (interface == GENERIC_SCSI) @@ -392,7 +394,7 @@ #ifdef DEBUG_XTRA fprintf(outfp, - "current guessed multisession_offset = %u\n", + _("current guessed multisession_offset = %u\n"), mult_off); #endif return (mult_off); @@ -524,7 +526,7 @@ */ 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); } @@ -571,7 +573,7 @@ } #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 @@ -636,8 +638,8 @@ } if (global.quiet == 0) { fprintf(outfp, - "%ld sectors of %sdata before track #%ld", - sect, !isdata ? "audio ":"", FirstAudioTrack()); + _("%ld sectors of %sdata before track #%ld"), + sect, !isdata ? _("audio "):"", FirstAudioTrack()); } /* * switch cdrom to audio mode @@ -647,12 +649,12 @@ if (isdata && i != 1) { if (global.quiet == 0) { fprintf(outfp, - ", ignoring.\n"); + _(", ignoring.\n")); } } else if (i != 1) { if (global.quiet == 0) { fprintf(outfp, - ", unreadable by this drive.\n"); + _(", unreadable by this drive.\n")); } have_hiddenAudioTrack = 0; } else { @@ -667,7 +669,7 @@ global.nsectors * CD_FRAMESIZE_RAW) { if (global.quiet == 0) { fprintf(outfp, - ", audible data at sector %d.\n", + _(", audible data at sector %d.\n"), n + o / CD_FRAMESIZE_RAW); } break; @@ -680,7 +682,7 @@ } else { if (global.quiet == 0) fprintf(outfp, - "Hidden audio track with %ld sectors found.\n", sect); + _("Hidden audio track with %ld sectors found.\n"), sect); } } get_scsi_p()->silent--; @@ -1000,7 +1002,7 @@ } #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'; } @@ -1022,7 +1024,7 @@ 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); @@ -1270,7 +1272,7 @@ * list entries. */ q = p; - fprintf(outfp, "%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'; @@ -1278,13 +1280,16 @@ o = q+1; q = (char *)memchr(q, '\n', size - (q-p)); } - fprintf(outfp, "%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(outfp, "please choose one (0-%u): ", nr); + fprintf(outfp, _("please choose one (0-%u): "), nr); + fflush(outfp); if (scanf("%u", &user_choice) != 1) user_choice = nr; } while (user_choice > nr); @@ -1331,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; } @@ -1356,7 +1361,7 @@ 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"); + errmsg(_("Cddb cannot resolve freedb host.\n")); sa.sin_family = AF_INET; sa.sin_addr.s_addr = htonl(UINT_C(0x526256aa)); /* freedb.freedb.de */ } @@ -1385,7 +1390,7 @@ /* 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; } @@ -1400,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; } @@ -1425,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 = '_'; @@ -1434,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 = '_'; @@ -1458,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 = '_'; @@ -1467,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 = '_'; @@ -1490,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; } @@ -1510,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; @@ -1545,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; @@ -1663,7 +1668,7 @@ break; default: errmsgno(EX_BAD, - "Multiple entries found: %s.\n", inbuff); + _("Multiple entries found: %s.\n"), inbuff); retval = 2; goto signoff; } @@ -1671,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; } @@ -1705,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: @@ -1728,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; } @@ -2045,7 +2050,7 @@ block_number = ((unsigned)(c->headerfield[3] & 0x30)) >> 4; /* language */ character_position = c->headerfield[3] & 0x0f; - fprintf(outfp, "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 @@ -2074,7 +2079,7 @@ #else if (DETAILED) { if (crc_error) - fputs(" ! uncorr. CRC-Error", outfp); + fputs(_(" ! uncorr. CRC-Error"), outfp); fputs("\n", outfp); } #endif @@ -2206,43 +2211,43 @@ if ((global.verbose & SHOW_STARTPOSITIONS) != 0) { if (global.illleadout_cd != 0 && have_CD_extra == 0) { fprintf(outfp, - "Tracks:%u > %u:%02u.%02u\n", + _("Tracks:%u > %u:%02u.%02u\n"), cdtracks, mins, secnds, frames); } else { fprintf(outfp, - "Tracks:%u %u:%02u.%02u\n", + _("Tracks:%u %u:%02u.%02u\n"), cdtracks, mins, secnds, frames); } } if (global.quiet == 0) { - fprintf(outfp, "CDINDEX discid: %s\n", global.cdindex_id); - fprintf(outfp, "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(outfp, " CDDBP titles: resolved\n"); + fprintf(outfp, _(" CDDBP titles: resolved\n")); } else { fprintf(outfp, "\n"); } if (have_CD_text != 0) { - fprintf(outfp, "CD-Text: detected\n"); + fprintf(outfp, _("CD-Text: detected\n")); dump_cdtext_info(); } else { - fprintf(outfp, "CD-Text: not detected\n"); + fprintf(outfp, _("CD-Text: not detected\n")); } if (have_CD_extra != 0) { - fprintf(outfp, "CD-Extra: detected\n"); + fprintf(outfp, _("CD-Extra: detected\n")); dump_extra_info(have_CD_extra); } else { - fprintf(outfp, "CD-Extra: not detected\n"); + fprintf(outfp, _("CD-Extra: not detected\n")); } fprintf(outfp, - "Album title: '%s'", (void *)global.disctitle != NULL + _("Album title: '%s'"), (void *)global.disctitle != NULL ? quote(global.disctitle) : ""); - fprintf(outfp, " from '%s'\n", (void *)global.performer != NULL + fprintf(outfp, _(" from '%s'\n"), (void *)global.performer != NULL ? quote(global.performer) : ""); } count_audio_trks = 0; @@ -2286,17 +2291,17 @@ if (global.verbose & SHOW_SUMMARY) fprintf(outfp, - " data %s %s N/A", + _(" data %s %s N/A"), /* how recorded */ IS__INCREMENTAL(o) - ? "incremental" : - "uninterrupted", + ? _("incremental") : + _("uninterrupted"), /* copy-permission */ IS__COPYRIGHTED(o) - ? "copydenied" : - "copyallowed"); + ? _("copydenied") : + _("copyallowed")); fputs("\n", outfp); } else { dw = (unsigned long) (GETSTART(p) - @@ -2317,24 +2322,24 @@ if (global.verbose & SHOW_SUMMARY) fprintf(outfp, - " audio %s %s %s", + _(" 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(outfp, - " title '%s' from ", + _(" title '%s' from "), (void *) global.tracktitle[GETTRACK(o)] != NULL ? quote(global.tracktitle[GETTRACK(o)]) : ""); @@ -2352,7 +2357,7 @@ } /* while */ if (global.verbose & SHOW_STARTPOSITIONS) if (GETTRACK(o) == CDROM_LEADOUT) { - fprintf(outfp, "Leadout: %7u\n", GETSTART(o)); + fprintf(outfp, _("Leadout: %7u\n"), GETSTART(o)); } } /* if */ } @@ -2395,26 +2400,26 @@ continue; if (IS__DATA(o)) { - fputs(" DATAtrack recorded copy-permitted tracktype\n", outfp); + fputs(_(" DATAtrack recorded copy-permitted tracktype\n"), outfp); fprintf(outfp, - " %2d-%2d %13.13s %14.14s data\n", + _(" %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", outfp); + fputs(_("AUDIOtrack pre-emphasis copy-permitted tracktype channels\n"), outfp); fprintf(outfp, - " %2d-%2d %12.12s %14.14s audio %1c\n", + _(" %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++; } @@ -2425,11 +2430,11 @@ if (global.illleadout_cd != 0 && have_multisession == 0) { fprintf(outfp, - "Table of Contents: total tracks:%u, (total time more than %u:%02u.%02u)\n", + _("Table of Contents: total tracks:%u, (total time more than %u:%02u.%02u)\n"), cdtracks, mins, secnds, frames); } else { fprintf(outfp, - "Table of Contents: total tracks:%u, (total time %u:%02u.%02u)\n", + _("Table of Contents: total tracks:%u, (total time %u:%02u.%02u)\n"), cdtracks, mins, secnds, frames); } } @@ -2494,7 +2499,7 @@ } /* if */ if ((global.verbose & SHOW_STARTPOSITIONS) != 0) { - fputs("\nTable of Contents: starting sectors\n", outfp); + fputs(_("\nTable of Contents: starting sectors\n"), outfp); ii = 0; InitIterator(&i, 1); @@ -2522,38 +2527,38 @@ fputc(',', outfp); o = p; } - fprintf(outfp, " lead-out(%8u)", GETSTART(o)); + fprintf(outfp, _(" lead-out(%8u)"), GETSTART(o)); fputs("\n", outfp); } } if (global.quiet == 0) { - fprintf(outfp, "CDINDEX discid: %s\n", global.cdindex_id); - fprintf(outfp, "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(outfp, " CDDBP titles: resolved\n"); + fprintf(outfp, _(" CDDBP titles: resolved\n")); } else { fprintf(outfp, "\n"); } if (have_CD_text != 0) { - fprintf(outfp, "CD-Text: detected\n"); + fprintf(outfp, _("CD-Text: detected\n")); } else { - fprintf(outfp, "CD-Text: not detected\n"); + fprintf(outfp, _("CD-Text: not detected\n")); } if (have_CD_extra != 0) { - fprintf(outfp, "CD-Extra: detected\n"); + fprintf(outfp, _("CD-Extra: detected\n")); } else { - fprintf(outfp, "CD-Extra: not detected\n"); + fprintf(outfp, _("CD-Extra: not detected\n")); } } if ((global.verbose & SHOW_TITLES) != 0) { int maxlen = 0; if (global.disctitle != NULL) { - fprintf(outfp, "Album title: '%s'", global.disctitle); + fprintf(outfp, _("Album title: '%s'"), global.disctitle); if (global.performer != NULL) { - fprintf(outfp, "\t[from %s]", global.performer); + fprintf(outfp, _("\t[from %s]"), global.performer); } fputs("\n", outfp); } @@ -2585,10 +2590,10 @@ if (maxlen != 3) { if (global.tracktitle[jj] != NULL) { - fprintf(outfp, "Track %2u: '%s'", + fprintf(outfp, _("Track %2u: '%s'"), jj, global.tracktitle[jj]); } else { - fprintf(outfp, "Track %2u: '%s'", + fprintf(outfp, _("Track %2u: '%s'"), jj, ""); } if (global.trackperformer[jj] != NULL && @@ -2611,7 +2616,7 @@ fprintf(outfp, "\t"); } fprintf(outfp, - "[from %s]", + _("[from %s]"), global.trackperformer[jj]); } fputs("\n", outfp); @@ -2657,7 +2662,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) { @@ -2669,16 +2674,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(outfp, "Switching index scan and ISRC scan off!\n"); + fprintf(outfp, _("Switching index scan and ISRC scan off!\n")); } if (global.quiet == 0) { fprintf(outfp, - "Audio extraction will be limited to track %ld with maximal %ld sectors...\n", + _("Audio extraction will be limited to track %ld with maximal %ld sectors...\n"), LastTrack(), Get_EndSector(LastTrack())+1); } @@ -2692,7 +2697,7 @@ patch_real_end(150 + (99*60+59)*75 + 74); if (global.quiet == 0) { fprintf(outfp, - "Restrictions apply, since the size of the last track is unknown!\n"); + _("Restrictions apply, since the size of the last track is unknown!\n")); } } } @@ -2737,7 +2742,7 @@ subq_chnl *sub_ch; subq_catalog *subq_cat = NULL; - fprintf(outfp, "scanning for MCN..."); + fprintf(outfp, _("scanning for MCN...")); sub_ch = ReadSubQ(get_scsi_p(), GET_CATALOGNUMBER, 0); @@ -2843,7 +2848,7 @@ subq_chnl *sub_ch; subq_track_isrc *subq_tr; - fprintf(outfp, "\rscanning for ISRCs: %d ...", tr); + fprintf(outfp, _("\rscanning for ISRCs: %d ..."), tr); subq_tr = NULL; sub_ch = ReadSubQ(get_scsi_p(), GET_TRACK_ISRC, tr); @@ -2940,7 +2945,7 @@ if ((cp[7] & 3) == 3) { if (global.verbose) { fprintf(outfp, - "Recorder-ID encountered: "); + _("Recorder-ID encountered: ")); for (bits = 0; bits < 30; bits += 6) { unsigned binval = (ind & (ULONG_C(0x3f) << (24-bits))) >> (24-bits); @@ -2967,7 +2972,7 @@ } if ((cp[7] & 3) != 0) { fprintf(outfp, - "unknown mode 3 entry C1=0x%02x, C2=0x%02x\n", + _("unknown mode 3 entry C1=0x%02x, C2=0x%02x\n"), (cp[7] >> 1) & 1, cp[7] & 1); return; } @@ -2986,7 +2991,7 @@ Get_ISRC(tr)[0] = '\0'; fprintf(outfp, - "\nIllegal ISRC for track %d, skipped: ", + _("\nIllegal ISRC for track %d, skipped: "), tr); for (y = 0; y < 15; y++) { fprintf(outfp, "%02x ", @@ -3033,7 +3038,7 @@ int y; Get_ISRC(ii)[0] = '\0'; - fprintf(outfp, "\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(outfp, "%02x ", cp[y]); } @@ -3083,11 +3088,11 @@ if (Get_MCN()[0] != '\0') { fprintf(outfp, - "\rMedia catalog number: %13.13s\n", + _("\rMedia catalog number: %13.13s\n"), Get_MCN()); } else { fprintf(outfp, - "\rNo media catalog number present.\n"); + _("\rNo media catalog number present.\n")); } } @@ -3195,7 +3200,7 @@ } ReadSubChannels = NULL; fprintf(outfp, - "\nCould not get position information (%02x) for sectors %d, %d, %d: switching ReadSubChannels off !\n", + _("\nCould not get position information (%02x) for sectors %d, %d, %d: switching ReadSubChannels off !\n"), sub_ch->control_adr &0x0f, sec-1, sec, sec+2); } @@ -3267,7 +3272,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); @@ -3289,7 +3294,7 @@ if (sub_ch->index != 0 && track != sub_ch->track) { if (global.verbose) fprintf(outfp, - "\ntrack mismatch: %1d, in-track subchannel: %1d (index %1d, sector %1d)\n", + _("\ntrack mismatch: %1d, in-track subchannel: %1d (index %1d, sector %1d)\n"), track, sub_ch->track, sub_ch->index, sec); } #endif @@ -3306,9 +3311,9 @@ */ if (global.verbose) { 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"); + _("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) { @@ -3317,9 +3322,9 @@ */ if (global.verbose) { 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"); + _("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)) { @@ -3329,9 +3334,9 @@ */ if (global.verbose) { 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"); + _("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, @@ -3349,9 +3354,9 @@ */ if (global.verbose) 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"); + _("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), @@ -3428,7 +3433,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; } @@ -3456,7 +3461,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; } @@ -3591,7 +3596,7 @@ #if defined INFOFILES } else { fprintf(outfp, - "No memory for index lists. Index positions\nwill not be written in info file!\n"); + _("No memory for index lists. Index positions\nwill not be written in info file!\n")); #endif } } @@ -3642,7 +3647,7 @@ EnableCdda(scgp, 1, CD_FRAMESIZE_RAW + 16); if (!global.quiet && !(global.verbose & SHOW_INDICES)) - fprintf(outfp, "seeking index start ..."); + fprintf(outfp, _("seeking index start ...")); if (bulk != 1) { starttrack = track; @@ -3671,7 +3676,7 @@ if (global.illleadout_cd && global.reads_illleadout && ii == endtrack) { fprintf(outfp, - "Analysis of track %d skipped due to unknown length\n", ii); + _("Analysis of track %d skipped due to unknown length\n"), ii); } } if (global.illleadout_cd && global.reads_illleadout && @@ -3683,7 +3688,7 @@ Set_SCMS(ii); } if (global.verbose & SHOW_INDICES) { - fprintf(outfp, "\rindex scan: %d...", ii); + fprintf(outfp, _("\rindex scan: %d..."), ii); fflush(outfp); } LastIndex = ScanBackwardFrom(Get_EndSector(ii), StartSector, @@ -3716,7 +3721,7 @@ if ((global.verbose & SHOW_INDICES) && LastIndex > 1) { fprintf(outfp, - "\rtrack %2d has %d indices, index table (pairs of 'index: frame offset')\n", + _("\rtrack %2d has %d indices, index table (pairs of 'index: frame offset')\n"), ii, LastIndex); } startindex = 0; diff -Nru cdrtools-3.00~trusty~mc3man1/cdrecord/auinfo.c cdrtools-3.01a26~trusty/cdrecord/auinfo.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/auinfo.c 2010-01-31 21:12:21.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/auinfo.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)auinfo.c 1.32 10/01/31 Copyright 1998-2010 J. Schilling */ +/* @(#)auinfo.c 1.33 10/12/19 Copyright 1998-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)auinfo.c 1.32 10/01/31 Copyright 1998-2010 J. Schilling"; + "@(#)auinfo.c 1.33 10/12/19 Copyright 1998-2010 J. Schilling"; #endif /* * Copyright (c) 1998-2010 J. Schilling @@ -29,6 +29,7 @@ #include #include #include +#include #include "cdtext.h" #include "cdrecord.h" @@ -106,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); } @@ -122,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); @@ -131,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); @@ -141,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; @@ -315,7 +316,7 @@ astol(p, &l); if (track == 1 && tr == 1 && l > 0) { trackp[1].pregapsize = 150 + l; - printf("Track1 Start: '%s' (%ld)\n", p, l); + printf(_("Track1 Start: '%s' (%ld)\n"), p, l); } } @@ -384,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; } @@ -401,7 +402,7 @@ if (ret) strcpy(ret, str); else - comerr("Cannot malloc auinfo string.\n"); + comerr(_("Cannot malloc auinfo string.\n")); return (ret); } @@ -453,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"; @@ -474,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); } /* @@ -504,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); } /* @@ -560,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); @@ -588,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++; @@ -598,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++) @@ -609,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-3.00~trusty~mc3man1/cdrecord/cd_misc.c cdrtools-3.01a26~trusty/cdrecord/cd_misc.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/cd_misc.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/cd_misc.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)cd_misc.c 1.17 09/07/10 Copyright 1997-2009 J. Schilling */ +/* @(#)cd_misc.c 1.18 10/12/19 Copyright 1997-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)cd_misc.c 1.17 09/07/10 Copyright 1997-2009 J. Schilling"; + "@(#)cd_misc.c 1.18 10/12/19 Copyright 1997-2010 J. Schilling"; #endif /* * Misc CD support routines * - * Copyright (c) 1997-2009 J. Schilling + * Copyright (c) 1997-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -26,6 +26,7 @@ #include /* Includes for caddr_t */ #include #include +#include #include "cdrecord.h" @@ -136,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-3.00~trusty~mc3man1/cdrecord/cdr_drv.c cdrtools-3.01a26~trusty/cdrecord/cdr_drv.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/cdr_drv.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/cdr_drv.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)cdr_drv.c 1.48 09/07/10 Copyright 1997-2009 J. Schilling */ +/* @(#)cdr_drv.c 1.49 10/12/19 Copyright 1997-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)cdr_drv.c 1.48 09/07/10 Copyright 1997-2009 J. Schilling"; + "@(#)cdr_drv.c 1.49 10/12/19 Copyright 1997-2010 J. Schilling"; #endif /* * CDR device abstraction layer * - * Copyright (c) 1997-2009 J. Schilling + * Copyright (c) 1997-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -27,6 +27,7 @@ #include /* Include sys/types.h to make off_t available */ #include #include +#include #include #include @@ -139,7 +140,7 @@ EXPORT int attach_unknown() { - errmsgno(EX_BAD, "Unsupported drive type\n"); + errmsgno(EX_BAD, _("Unsupported drive type\n")); return (-1); } @@ -150,7 +151,7 @@ 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); } @@ -176,13 +177,13 @@ 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"); + 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", + 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); @@ -190,7 +191,7 @@ flush(); } if (0) { - 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); } return (ret); @@ -203,7 +204,7 @@ 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); } @@ -220,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); } @@ -238,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); } @@ -247,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); } @@ -279,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); @@ -321,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":"-", @@ -343,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); } @@ -388,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-3.00~trusty~mc3man1/cdrecord/cdrecord.1 cdrtools-3.01a26~trusty/cdrecord/cdrecord.1 --- cdrtools-3.00~trusty~mc3man1/cdrecord/cdrecord.1 2010-06-01 22:12:47.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/cdrecord.1 2014-12-03 19:13:13.000000000 +0000 @@ -1,4 +1,4 @@ -.\" @(#)cdrecord.1 1.144 10/06/02 Copyright 1996-2010 J. Schilling +.\" @(#)cdrecord.1 1.146 14/12/03 Copyright 1996-2010 J. Schilling .\" .\" The contents of this file are subject to the terms of the .\" Common Development and Distribution License, Version 1.0 only @@ -6,6 +6,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. @@ -2046,7 +2048,7 @@ .PP Then write the disk using: .PP - cdrecord dev=2,0 \-raw96r \-clone \-v somefile + cdrecord dev=2,0 \-v somefile .PP .SS "Replicating a CD-ROM in clone mode @@ -3426,7 +3428,7 @@ you may join the developer mailing list via this URL: .sp .B -http://lists.berlios.de/mailman/listinfo/cdrecord-developers +https://lists.sourceforge.net/lists/listinfo/cdrtools-developers .SH AUTHOR .nf @@ -3438,17 +3440,17 @@ .PP Additional information can be found on: .br -http://cdrecord.berlios.de/private/cdrecord.html +http://cdrecord.org/private/cdrecord.html .PP If you have support questions, send them to: .PP .B -cdrecord-support@berlios.de +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 @@ -3457,11 +3459,11 @@ 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 diff -Nru cdrtools-3.00~trusty~mc3man1/cdrecord/cdrecord.c cdrtools-3.01a26~trusty/cdrecord/cdrecord.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/cdrecord.c 2010-02-22 21:29:50.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/cdrecord.c 2015-01-01 14:18:23.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)cdrecord.c 1.397 10/02/22 Copyright 1995-2010 J. Schilling */ +/* @(#)cdrecord.c 1.412 15/01/01 Copyright 1995-2015 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)cdrecord.c 1.397 10/02/22 Copyright 1995-2010 J. Schilling"; + "@(#)cdrecord.c 1.412 15/01/01 Copyright 1995-2015 J. Schilling"; #endif /* * Record data on a CD/CVD-Recorder * - * Copyright (c) 1995-2010 J. Schilling + * Copyright (c) 1995-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -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. @@ -39,6 +41,7 @@ #include #include #include +#include #include #include "xio.h" @@ -167,6 +170,8 @@ 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 */ @@ -256,6 +261,7 @@ 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 @@ -274,6 +280,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; @@ -294,8 +303,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'); @@ -306,7 +367,7 @@ gargs(ac, av, &tracks, track, &dev, &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 @@ -376,32 +437,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-2010 Jörg Schilling\n", + printf(_("Cdrecord%s%s%s %s (%s-%s-%s) Copyright (C) 1995-2015 %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 } @@ -413,7 +475,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]); } @@ -441,8 +503,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 @@ -480,6 +542,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), @@ -487,27 +578,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. * @@ -524,7 +609,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 @@ -534,6 +619,7 @@ * XXX this function calls raisepri() to lower the priority slightly. */ scg_settimeout(scgp, timeout); + scgp->flags |= SCGF_PERM_PRINT; scgp->verbose = scsi_verbose; scgp->silent = silent; scgp->debug = debug; @@ -551,42 +637,42 @@ */ 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); @@ -606,11 +692,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); } /* @@ -631,9 +717,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); } @@ -642,9 +728,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); @@ -660,13 +746,13 @@ 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... */ @@ -677,7 +763,7 @@ 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; @@ -704,7 +790,7 @@ 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); } @@ -714,12 +800,12 @@ * 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; @@ -727,7 +813,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 */ @@ -737,7 +823,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); } @@ -754,11 +840,11 @@ 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); } } @@ -766,17 +852,17 @@ dma_speed = get_dmaspeed(scgp, dp); if (dma_speed <= 0) - errmsgno(EX_BAD, "Warning: The DMA speed test has been skipped.\n"); + 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) @@ -793,7 +879,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; @@ -839,7 +925,7 @@ 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) { @@ -913,7 +999,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) @@ -923,11 +1009,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) { /* @@ -962,7 +1048,7 @@ 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); } @@ -970,7 +1056,7 @@ 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"); + comerrno(EX_BAD, _("Wrong media, the cuefile= option only works with CDs.\n")); /* * The next actions should depend on the disk type. */ @@ -1007,7 +1093,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) { @@ -1016,14 +1102,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); } @@ -1048,8 +1134,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? @@ -1064,17 +1150,17 @@ 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); @@ -1086,7 +1172,7 @@ dp->cdr_dstat->ds_cdrflags &= ~RF_PRATIP; 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); } @@ -1103,17 +1189,17 @@ 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) { /* @@ -1131,12 +1217,12 @@ * 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 /* @@ -1157,7 +1243,7 @@ if (nbs != bufsize) { if (lverbose) { printf( - "Reducing transfer size from %ld to %ld bytes.\n", + _("Reducing transfer size from %ld to %ld bytes.\n"), bufsize, nbs); } bufsize = nbs; @@ -1180,12 +1266,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); } @@ -1195,7 +1281,7 @@ if (getenv("CDR_FORCERAWSPEED")) { errmsgno(EX_BAD, - "WARNING: 'CDR_FORCERAWSPEED=' is set, buffer underruns may occur.\n"); + _("WARNING: 'CDR_FORCERAWSPEED=' is set, buffer underruns may occur.\n")); max_raw = raw_speed; } @@ -1213,9 +1299,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; @@ -1228,28 +1314,28 @@ if ((p = getenv("CDR_FORCESPEED")) != NULL) { if ((dp->cdr_dstat->ds_cdrflags & RF_BURNFREE) == 0) { errmsgno(EX_BAD, - "WARNING: 'CDR_FORCSPEED=' is set.\n"); + _("WARNING: 'CDR_FORCESPEED=' is set.\n")); errmsgno(EX_BAD, - "WARNING: Use 'driveropts=burnfree' to avoid buffer underuns.\n"); + _("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); + 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"); + 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); @@ -1264,10 +1350,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")); } } @@ -1276,20 +1362,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 < 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 && @@ -1297,20 +1383,20 @@ 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")); } } } @@ -1318,7 +1404,7 @@ /* * This is a first "blind" blanking attempt. */ - printf("Waiting for drive to calm down.\n"); + printf(_("Waiting for drive to calm down.\n")); wait_unit_ready(scgp, 120); if (gracewait(dp, &gracedone) < 0) { /* @@ -1349,7 +1435,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); @@ -1359,7 +1445,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 @@ -1378,20 +1464,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? @@ -1405,7 +1491,7 @@ dp->cdr_dstat->ds_cdrflags &= ~RF_PRATIP; 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); } @@ -1419,10 +1505,10 @@ * 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. @@ -1439,7 +1525,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); } @@ -1455,7 +1541,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")); } /* @@ -1463,7 +1549,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); @@ -1482,22 +1568,22 @@ * 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 @@ -1517,7 +1603,7 @@ ((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; } @@ -1525,31 +1611,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); @@ -1563,7 +1649,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; } @@ -1571,19 +1657,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) { @@ -1591,14 +1677,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; @@ -1631,10 +1717,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); } @@ -1647,7 +1733,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); @@ -1665,17 +1751,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)); @@ -1698,18 +1784,18 @@ 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); @@ -1735,8 +1821,10 @@ #ifdef SIGINT excdr(SIGINT, &exargs); signal(SIGINT, SIG_DFL); +#ifdef HAVE_KILL kill(getpid(), SIGINT); #endif +#endif /* * In case kill() did not work ;-) */ @@ -1744,11 +1832,11 @@ *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); @@ -1810,7 +1898,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; @@ -1837,15 +1925,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); } } @@ -1857,15 +1945,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 */ } @@ -1874,96 +1962,97 @@ 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(_("\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); } @@ -1971,17 +2060,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 */ @@ -2022,13 +2111,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; @@ -2365,16 +2454,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; } @@ -2391,7 +2480,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; @@ -2409,7 +2498,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; } @@ -2417,7 +2506,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; } @@ -2435,7 +2524,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); } @@ -2448,15 +2537,15 @@ 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 /* * Work around a bug in the firmware from drives @@ -2478,7 +2567,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 @@ -2525,9 +2614,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); } @@ -2578,7 +2667,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; } @@ -2587,7 +2676,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); @@ -2645,7 +2734,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(); } @@ -2665,7 +2754,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; @@ -2681,12 +2770,12 @@ 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 @@ -2710,7 +2799,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 @@ -2775,7 +2864,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(); } @@ -2789,7 +2878,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; @@ -2801,7 +2890,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; @@ -2820,22 +2909,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", @@ -2849,21 +2938,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"); @@ -2876,16 +2965,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", @@ -2904,15 +2993,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) @@ -3052,7 +3141,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; @@ -3074,9 +3163,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"); } } @@ -3093,16 +3182,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), @@ -3158,7 +3247,7 @@ } 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); } } @@ -3175,9 +3264,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); } @@ -3197,7 +3286,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], @@ -3264,10 +3354,10 @@ if (trackp->itracksize < 0 && (trackp->flags & TI_ISOSIZE) != 0) { if ((trackp->flags & TI_STDIN) != 0) { if (trackp->track != 1) - comerrno(EX_BAD, "-isosize on stdin only works for the first track.\n"); + 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"); + comerrno(EX_BAD, _("Cannot malloc iso size buffer.\n")); isobsize = read_buf(f, isobuf, 32 * 2048); lsize = bisosize(isobuf, isobsize); } else { @@ -3275,26 +3365,26 @@ } 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 && @@ -3374,7 +3464,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); @@ -3385,23 +3475,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) || @@ -3412,16 +3502,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; } @@ -3430,15 +3520,15 @@ /* * dsp->ds_maxblocks == 0 (disk capacity is unknown). */ - errmsgno(EX_BAD, "Disk capacity is unknown.\n"); + errmsgno(EX_BAD, _("Disk capacity is unknown.\n")); if (endsec >= (405000-300)) { /*<90 min disk*/ errmsgno(EX_BAD, - "Data will not fit on any CD.\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 CD.\n"); + _("WARNING: Data may not fit on standard 74min CD.\n")); } } if (dsp->ds_maxblocks <= 0 || endsec <= dsp->ds_maxblocks) @@ -3449,17 +3539,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); } @@ -3469,21 +3559,21 @@ if (endsec <= dsp->ds_maxblocks) return (TRUE); if (dsp->ds_maxblocks <= 0) { - errmsgno(EX_BAD, "DVD/BD capacity is unknown.\n"); + errmsgno(EX_BAD, _("DVD/BD capacity is unknown.\n")); if ((flags & (F_IGNSIZE|F_FORCE)) != 0) { errmsgno(EX_BAD, - "Notice: -ignsize active.\n"); + _("Notice: -ignsize active.\n")); return (TRUE); } } - errmsgno(EX_BAD, "Cannot write more than remaining DVD/BD capacity.\n"); + 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); } } @@ -3509,7 +3599,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); @@ -3525,7 +3615,7 @@ rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY; if (setrlimit(RLIMIT_MEMLOCK, &rlim) < 0) - errmsg("Warning: Cannot raise RLIMIT_MEMLOCK limits.\n"); + errmsg(_("Warning: Cannot raise RLIMIT_MEMLOCK limits.\n")); #endif /* RLIMIT_MEMLOCK */ } @@ -3709,7 +3799,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) @@ -3879,42 +3969,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; } @@ -3931,7 +4021,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; @@ -3943,11 +4033,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. @@ -4087,7 +4177,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. @@ -4137,7 +4227,7 @@ 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. @@ -4186,9 +4276,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 } @@ -4228,18 +4318,18 @@ 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); @@ -4250,7 +4340,7 @@ bufsize = CDR_MAX_BUF_SIZE; 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) @@ -4259,7 +4349,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; } @@ -4268,7 +4358,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 @@ -4283,7 +4373,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; @@ -4306,20 +4396,20 @@ 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); } } @@ -4333,12 +4423,12 @@ int flags; { if (tracks == 0 && (*wmp == 0)) { - errmsgno(EX_BAD, "No write mode specified.\n"); - errmsgno(EX_BAD, "Assuming %s mode.\n", + 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"); + 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 { @@ -4357,7 +4447,7 @@ 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); } @@ -4375,7 +4465,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])) { @@ -4405,18 +4495,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 @@ -4438,7 +4528,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--; @@ -4453,8 +4543,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); @@ -4475,7 +4565,7 @@ scgp->silent--; err = geterrno(); if (code < 0 && (err == EPERM || err == EACCES)) { - linuxcheck(); /* For version 1.397 of cdrecord.c */ + linuxcheck(); /* For version 1.412 of cdrecord.c */ scg_openerr(""); } @@ -4494,7 +4584,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")); } } @@ -4508,7 +4598,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); /* @@ -4525,7 +4615,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(); @@ -4541,14 +4631,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--; @@ -4583,7 +4673,7 @@ if (read_buffer(scgp, buf, size, 0) < 0 || scg_getresid(scgp) != 0) { errmsgno(EX_BAD, - "Warning: 'read buffer' failed, DMA residual count %d.\n", + _("Warning: 'read buffer' failed, DMA residual count %d.\n"), scg_getresid(scgp)); return (-1); } @@ -4593,7 +4683,7 @@ */ 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"); + _("Warning: DMA resid 0 for 'read buffer', actual data is too short.\n")); return (-1); } return (0); @@ -4616,12 +4706,12 @@ i = read_buffer(scgp, buf, 4, 0); scgp->silent--; if (i < 0 || scg_getresid(scgp) != 0) { - errmsgno(EX_BAD, "Warning: Cannot read drive buffer.\n"); + errmsgno(EX_BAD, _("Warning: Cannot read drive buffer.\n")); return (-1); } tsize = a_to_u_3_byte(&buf[1]); if (tsize <= 0) { - errmsgno(EX_BAD, "Warning: Drive returned invalid buffer size.\n"); + errmsgno(EX_BAD, _("Warning: Drive returned invalid buffer size.\n")); return (-1); } @@ -4636,7 +4726,7 @@ if (read_buffer(scgp, buf, bs, 0) < 0) { scgp->silent--; errmsgno(EX_BAD, - "Warning: Cannot read %d bytes from drive buffer.\n", + _("Warning: Cannot read %d bytes from drive buffer.\n"), bs); return (-1); } @@ -4662,8 +4752,8 @@ 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", + 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)); } /* @@ -4671,7 +4761,7 @@ * They return less data than advertized as buffersize (tsize). */ if (maxdma < bs) { - errmsgno(EX_BAD, "Warning: drive returns unreliable data from 'read buffer'.\n"); + errmsgno(EX_BAD, _("Warning: drive returns unreliable data from 'read buffer'.\n")); return (-1); } if (maxdma < bs) @@ -4685,7 +4775,7 @@ scgp->silent--; if (gettimeofday(&starttime, (struct timezone *)0) < 0) { - errmsg("Cannot get DMA start time.\n"); + errmsg(_("Cannot get DMA start time.\n")); return (-1); } @@ -4694,7 +4784,7 @@ 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); @@ -4719,11 +4809,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); } @@ -4738,7 +4828,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); } @@ -4784,11 +4874,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 @@ -4796,7 +4886,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); @@ -4820,15 +4910,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 + @@ -4847,7 +4937,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++; } } @@ -4864,9 +4954,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, @@ -4900,7 +4990,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)); @@ -4912,8 +5002,8 @@ 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")); } } @@ -4948,14 +5038,14 @@ */ #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); @@ -4963,7 +5053,7 @@ #else /* _POSIX_PRIORITY_SCHEDULING */ -#if defined(__CYGWIN32__) || defined(__MINGW32__) +#if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER) /* * Win32 specific priority settings. */ @@ -4982,11 +5072,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 @@ -4997,13 +5086,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); @@ -5020,7 +5109,7 @@ return (-1); } -#endif /* __CYGWIN32__ || __MINGW32__ */ +#endif /* __CYGWIN32__ || __CYGWIN__ || __MINGW32__ */ #endif /* _POSIX_PRIORITY_SCHEDULING */ @@ -5033,8 +5122,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 */ @@ -5046,12 +5135,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 @@ -5063,14 +5152,18 @@ /* * 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 */ #include @@ -5080,20 +5173,24 @@ #ifdef HAVE_SELECT fd_set in; #else +#ifdef HAVE_POLL struct pollfd pfd; #endif +#endif if (lverbose) - printf("Waiting for data on stdin...\n"); + 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 +#ifdef HAVE_POLL pfd.fd = STDIN_FILENO; pfd.events = POLLIN; pfd.revents = 0; poll(&pfd, (unsigned long)1, INFTIM); #endif +#endif } LOCAL void @@ -5104,7 +5201,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")); } } @@ -5136,7 +5233,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); } @@ -5147,7 +5244,7 @@ print_drflags(dp) cdr_t *dp; { - printf("Driver flags : "); + printf(_("Driver flags : ")); if ((dp->cdr_flags2 & CDR2_NOCD) != 0) printf("NO-CD "); @@ -5247,50 +5344,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; } } @@ -5303,11 +5400,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); } @@ -5363,7 +5460,7 @@ } /* - * I am sorry that even for version 1.397 of cdrecord.c, I am forced to do + * I am sorry that even for version 1.412 of cdrecord.c, I am forced to do * things like this, but defective versions of cdrecord cause a lot of * work load to me. * @@ -5380,7 +5477,7 @@ #endif LOCAL void -linuxcheck() /* For version 1.397 of cdrecord.c */ +linuxcheck() /* For version 1.412 of cdrecord.c */ { #if defined(linux) || defined(__linux) || defined(__linux__) #ifdef HAVE_UNAME @@ -5391,18 +5488,26 @@ (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) diff -Nru cdrtools-3.00~trusty~mc3man1/cdrecord/cdrecord.dfl cdrtools-3.01a26~trusty/cdrecord/cdrecord.dfl --- cdrtools-3.00~trusty~mc3man1/cdrecord/cdrecord.dfl 2008-12-30 13:29:50.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/cdrecord.dfl 2014-01-03 21:59:27.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)cdrecord.dfl 1.7 08/12/30 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 @@ -46,7 +46,7 @@ # # 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 if the drive. If speed or fifosize +# 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". diff -Nru cdrtools-3.00~trusty~mc3man1/cdrecord/cdrecord.h cdrtools-3.01a26~trusty/cdrecord/cdrecord.h --- cdrtools-3.00~trusty~mc3man1/cdrecord/cdrecord.h 2010-01-31 21:16:21.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/cdrecord.h 2013-05-28 18:26:16.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)cdrecord.h 1.201 10/01/31 Copyright 1995-2010 J. Schilling */ +/* @(#)cdrecord.h 1.205 13/05/28 Copyright 1995-2013 J. Schilling */ /* * Definitions for cdrecord * - * Copyright (c) 1995-2010 J. Schilling + * Copyright (c) 1995-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -1214,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-3.00~trusty~mc3man1/cdrecord/cdtext.c cdrtools-3.01a26~trusty/cdrecord/cdtext.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/cdtext.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/cdtext.c 2011-04-03 17:36:04.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)cdtext.c 1.16 09/07/10 Copyright 1999-2009 J. Schilling */ +/* @(#)cdtext.c 1.20 11/04/03 Copyright 1999-2011 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)cdtext.c 1.16 09/07/10 Copyright 1999-2009 J. Schilling"; + "@(#)cdtext.c 1.20 11/04/03 Copyright 1999-2011 J. Schilling"; #endif /* * Generic CD-Text support functions * - * Copyright (c) 1999-2009 J. Schilling + * Copyright (c) 1999-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -29,6 +29,7 @@ #include #include #include +#include #include /* For write_leadin() */ @@ -99,6 +100,7 @@ txtpack_t *tp; char *p; txtsize_t *tsize; + txtpack_t *endp; int seqno; } txtarg_t; @@ -135,12 +137,12 @@ 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"); + errmsgno(EX_BAD, _("Empty CD-Text file.\n")); fclose(f); return (FALSE); } @@ -149,9 +151,9 @@ 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); } @@ -159,23 +161,23 @@ 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); } @@ -184,7 +186,7 @@ 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); @@ -194,12 +196,12 @@ 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); @@ -228,12 +230,12 @@ 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"); + errmsgno(EX_BAD, _("No CD-Text data found.\n")); return; } i = (len/sizeof (struct textpack)) % 4; @@ -247,7 +249,7 @@ 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; ) { @@ -323,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); @@ -345,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++) { @@ -441,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; @@ -529,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); } diff -Nru cdrtools-3.00~trusty~mc3man1/cdrecord/clone.c cdrtools-3.01a26~trusty/cdrecord/clone.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/clone.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/clone.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)clone.c 1.11 09/07/10 Copyright 2001-2009 J. Schilling */ +/* @(#)clone.c 1.12 10/12/19 Copyright 2001-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)clone.c 1.11 09/07/10 Copyright 2001-2009 J. Schilling"; + "@(#)clone.c 1.12 10/12/19 Copyright 2001-2010 J. Schilling"; #endif /* * Clone Subchannel processing * - * Copyright (c) 2001-2009 J. Schilling + * Copyright (c) 2001-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -89,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); } @@ -110,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) { @@ -174,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-3.00~trusty~mc3man1/cdrecord/cue.c cdrtools-3.01a26~trusty/cdrecord/cue.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/cue.c 2010-02-22 21:23:49.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/cue.c 2013-12-21 20:59:22.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)cue.c 1.54 10/02/22 Copyright 2001-2010 J. Schilling */ +/* @(#)cue.c 1.57 13/12/21 Copyright 2001-2013 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)cue.c 1.54 10/02/22 Copyright 2001-2010 J. Schilling"; + "@(#)cue.c 1.57 13/12/21 Copyright 2001-2013 J. Schilling"; #endif /* * Cue sheet parser * - * Copyright (c) 2001-2010 J. Schilling + * Copyright (c) 2001-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -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. @@ -30,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -169,15 +172,15 @@ LOCAL keyw_t keywords[] = { - { "ARRANGER", K_ARRANGER }, + { "ARRANGER", K_ARRANGER }, /* Not supported by CDR-WIN */ { "CATALOG", K_MCN }, { "CDTEXTFILE", K_TEXTFILE }, - { "COMPOSER", K_COMPOSER }, + { "COMPOSER", K_COMPOSER }, /* Not supported by CDR-WIN */ { "FILE", K_FILE }, { "FLAGS", K_FLAGS }, { "INDEX", K_INDEX }, { "ISRC", K_ISRC }, - { "MESSAGE", K_MESSAGE }, + { "MESSAGE", K_MESSAGE }, /* Not supported by CDR-WIN */ { "PERFORMER", K_PERFORMER }, { "POSTGAP", K_POSTGAP }, { "PREGAP", K_PREGAP }, @@ -215,8 +218,8 @@ { "AIFF", K_AIFF }, { "WAVE", K_WAVE }, { "MP3", K_MP3 }, - { "AU", K_AU }, - { "OGG", K_OGG }, + { "AU", K_AU }, /* Not supported by CDR-WIN */ + { "OGG", K_OGG }, /* Not supported by CDR-WIN */ { NULL, 0 }, }; @@ -401,7 +404,7 @@ state.pflags = 0; if (xdebug > 1) - printf("---> Entering CUE Parser...\n"); + printf(_("---> Entering CUE Parser...\n")); do { if (nextline(f) == NULL) { /* @@ -409,15 +412,15 @@ * Do post processing here */ if (state.state < STATE_INDEX1 && state.state != STATE_POSTGAP) { - statewarn(&state, "INDEX 01 missing"); - cueabort("Incomplete CUE file"); + 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 %2.2d tracks.\n", + printf(_("---> CUE Parser got EOF, found %2.2d tracks.\n"), state.track); } return; @@ -427,10 +430,10 @@ 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) @@ -439,9 +442,9 @@ if ((kp->k_type & K_T) == 0) { if (!isglobal) { statewarn(&state, - "%s keyword must be before first TRACK", + _("%s keyword must be before first TRACK"), word); - cueabort("Badly placed CUE keyword '%s'", word); + cueabort(_("Badly placed CUE keyword '%s'"), word); } } #ifdef DEBUG @@ -469,7 +472,7 @@ 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); } @@ -486,8 +489,8 @@ extabort("ARRANGER"); if (sp->track > 0 && sp->state > STATE_INDEX0) { - statewarn(sp, "ARRANGER keyword cannot be after INDEX keyword"); - cueabort("Badly placed ARRANGER keyword"); + statewarn(sp, _("ARRANGER keyword cannot be after INDEX keyword")); + cueabort(_("Badly placed ARRANGER keyword")); } word = needitem("arranger"); @@ -506,7 +509,7 @@ 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("MCN"); setmcn(word, &trackp[0]); @@ -524,20 +527,20 @@ char *word; if (sp->track != 0) - cueabort("CDTEXTFILE keyword must be before first TRACK"); + cueabort(_("CDTEXTFILE keyword must be before first TRACK")); 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(); @@ -555,8 +558,8 @@ extabort("COMPOSER"); if (sp->track > 0 && sp->state > STATE_INDEX0) { - statewarn(sp, "COMPOSER keyword cannot be after INDEX keyword"); - cueabort("Badly placed COMPOSER keyword"); + statewarn(sp, _("COMPOSER keyword cannot be after INDEX keyword")); + cueabort(_("Badly placed COMPOSER keyword")); } word = needitem("composer"); @@ -585,19 +588,19 @@ (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"); + 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"); + 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"); + 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"); + cueabort(_("Only one FILE keyword allowed per TRACK")); sp->pflags |= PF_FILE_FOUND; sp->state = STATE_FILE; @@ -626,9 +629,9 @@ } if (sp->xfp == NULL) { #ifdef PARSE_DEBUG - errmsg("Cannot open FILE '%s'.\n", word); + errmsg(_("Cannot open FILE '%s'.\n"), word); #else - comerr("Cannot open FILE '%s'.\n", word); + comerr(_("Cannot open FILE '%s'.\n"), word); #endif } @@ -641,11 +644,11 @@ 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); + extabort(_("Filetype '%s'"), kp->k_name); switch (kp->k_type) { @@ -654,13 +657,15 @@ 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)); @@ -675,18 +680,18 @@ 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[%2.2d] %2.2d File '%s' Filesize %lld\n", + printf(_("Track[%2.2d] %2.2d File '%s' Filesize %lld\n"), sp->track, sp->trackno, sp->filename, sp->filesize); sp->filetype = kp->k_type; @@ -697,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 } @@ -711,8 +716,8 @@ if ((sp->state < STATE_TRACK) || (sp->state >= STATE_INDEX0)) { - statewarn(sp, "FLAGS keyword must be after TRACK and before INDEX keyword"); - cueabort("Badly placed FLAGS keyword"); + statewarn(sp, _("FLAGS keyword must be after TRACK and before INDEX keyword")); + cueabort(_("Badly placed FLAGS keyword")); } sp->state = STATE_FLAGS; @@ -720,7 +725,7 @@ word = needitem("flag"); kp = lookup(word, flags); if (kp == NULL) - cueabort("Unknown flag '%s'", word); + cueabort(_("Unknown flag '%s'"), word); switch (kp->k_type) { @@ -728,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[%2.2d] %2.2d flags 0x%08X\n", sp->track, sp->trackno, sp->flags); + printf(_("Track[%2.2d] %2.2d flags 0x%08X\n"), sp->track, sp->trackno, sp->flags); } LOCAL void @@ -751,29 +756,29 @@ sp->prevstate >= STATE_TRACK && sp->prevstate <= STATE_INDEX1) { if ((sp->pflags & PF_CDRTOOLS_EXT) == 0) - extabort("INDEX keyword after FILE keyword"); + extabort(_("INDEX keyword after FILE keyword")); goto index_ok; } - statewarn(sp, "INDEX keyword must be after TRACK keyword"); - cueabort("Badly placed INDEX keyword"); + statewarn(sp, _("INDEX keyword must be after TRACK keyword")); + cueabort(_("Badly placed INDEX keyword")); } index_ok: 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 %2.2ld 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); + cueabort(_("INDEX %2.2d not allowed after FILE"), l); if (l == 1) sp->pflags |= PF_INDEX0_PREV; } @@ -787,7 +792,7 @@ parse_offset(&l); if (xdebug > 1) - printf("Track[%2.2d] %2.2d Index %2.2d %ld\n", sp->track, sp->trackno, sp->index, l); + printf(_("Track[%2.2d] %2.2d Index %2.2d %ld\n"), sp->track, sp->trackno, sp->index, l); if (track == 1 || !streql(sp->filename, trackp[track-1].filename)) { @@ -795,9 +800,9 @@ * 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)"); + 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)"); + cueabort(_("Bad INDEX 01 offset in CUE file (must be 00:00:00 for new FILE)")); } if (sp->index == 0) { @@ -808,7 +813,7 @@ newtrack(trackp, sp); if (xdebug > 1) { - printf("Track[%2.2d] %2.2d pregapsize %ld\n", + printf(_("Track[%2.2d] %2.2d pregapsize %ld\n"), sp->track, sp->trackno, trackp[track].pregapsize); } } else if (sp->index == 2) { @@ -834,19 +839,19 @@ 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)) { - statewarn(sp, "ISRC keyword must be after TRACK and before INDEX keyword"); - cueabort("Badly placed ISRC keyword"); + statewarn(sp, _("ISRC keyword must be after TRACK and before INDEX keyword")); + cueabort(_("Badly placed ISRC keyword")); } sp->state = STATE_FLAGS; word = needitem("ISRC"); if ((sp->pflags & PF_CDRTOOLS_EXT) == 0 && strchr(word, '-')) { - extabort("'-' in ISRC arg"); + extabort(_("'-' in ISRC arg")); } setisrc(word, &trackp[track]); txp = gettextptr(track, trackp); @@ -867,8 +872,8 @@ extabort("MESSAGE"); if (sp->track > 0 && sp->state > STATE_INDEX0) { - statewarn(sp, "MESSAGE keyword cannot be after INDEX keyword"); - cueabort("Badly placed MESSAGE keyword"); + statewarn(sp, _("MESSAGE keyword cannot be after INDEX keyword")); + cueabort(_("Badly placed MESSAGE keyword")); } word = needitem("message"); @@ -887,8 +892,8 @@ textptr_t *txp; if (sp->track > 0 && sp->state > STATE_INDEX0) { - statewarn(sp, "PERFORMER keyword cannot be after INDEX keyword"); - cueabort("Badly placed PERFORMER keyword"); + statewarn(sp, _("PERFORMER keyword cannot be after INDEX keyword")); + cueabort(_("Badly placed PERFORMER keyword")); } word = needitem("performer"); @@ -906,8 +911,8 @@ long l; if (sp->state < STATE_INDEX1) { - statewarn(sp, "POSTGAP keyword must be after INDEX 01"); - cueabort("Badly placed POSTGAP keyword"); + statewarn(sp, _("POSTGAP keyword must be after INDEX 01")); + cueabort(_("Badly placed POSTGAP keyword")); } sp->state = STATE_POSTGAP; @@ -933,8 +938,8 @@ if ((sp->state < STATE_TRACK) || (sp->state >= STATE_INDEX0)) { - statewarn(sp, "PREGAP keyword must be after TRACK and before INDEX keyword"); - cueabort("Badly placed PREGAP keyword"); + statewarn(sp, _("PREGAP keyword must be after TRACK and before INDEX keyword")); + cueabort(_("Badly placed PREGAP keyword")); } sp->state = STATE_FLAGS; @@ -959,7 +964,7 @@ streql(word, "CDRTOOLS")) { sp->pflags |= PF_CDRTOOLS_EXT; errmsgno(EX_BAD, - "Warning: Enabling cdrecord specific CUE extensions.\n"); + _("Warning: Enabling cdrecord specific CUE extensions.\n")); } if ((sp->pflags & PF_CDRTOOLS_EXT) == 0 && streql(word, "COMMENT")) { @@ -970,7 +975,7 @@ if (strncmp(word, "ExactAudioCopy ", 15) == 0) { sp->pflags |= PF_CDRTOOLS_EXT; errmsgno(EX_BAD, - "Warning: Found ExactAudioCopy, enabling CUE extensions.\n"); + _("Warning: Found ExactAudioCopy, enabling CUE extensions.\n")); } } } @@ -984,8 +989,8 @@ textptr_t *txp; if (sp->track > 0 && sp->state > STATE_INDEX0) { - statewarn(sp, "SONGWRITER keyword cannot be after INDEX keyword"); - cueabort("Badly placed SONGWRITER keyword"); + statewarn(sp, _("SONGWRITER keyword cannot be after INDEX keyword")); + cueabort(_("Badly placed SONGWRITER keyword")); } word = needitem("songwriter"); txp = gettextptr(sp->track, trackp); @@ -1003,8 +1008,8 @@ textptr_t *txp; if (sp->track > 0 && sp->state > STATE_INDEX0) { - statewarn(sp, "TITLE keyword cannot be after INDEX keyword"); - cueabort("Badly placed TITLE keyword"); + statewarn(sp, _("TITLE keyword cannot be after INDEX keyword")); + cueabort(_("Badly placed TITLE keyword")); } word = needitem("title"); txp = gettextptr(sp->track, trackp); @@ -1025,8 +1030,8 @@ if ((sp->state >= STATE_TRACK) && (sp->state < STATE_INDEX1)) { - statewarn(sp, "TRACK keyword must be after INDEX 01"); - cueabort("Badly placed TRACK keyword"); + 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) @@ -1041,25 +1046,25 @@ 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->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("data type"); kp = lookup(word, dtypes); if (kp == NULL) - cueabort("Unknown data type '%s'", word); + cueabort(_("Unknown data type '%s'"), word); if (getworddelim() == '/') { word = needitem("sector size"); if (*astol(++word, &secsize) != '\0') - cueabort("Not a number '%s'", word); + cueabort(_("Not a number '%s'"), word); } /* @@ -1085,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: @@ -1102,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: @@ -1119,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) @@ -1132,7 +1137,7 @@ sp->secsize = secsize; if (xdebug > 1) { - printf("Track[%2.2d] %2.2d Tracktype %s/%d\n", + printf(_("Track[%2.2d] %2.2d Tracktype %s/%d\n"), sp->track, sp->trackno, kp->k_name, sp->secsize); } @@ -1153,23 +1158,23 @@ 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; @@ -1187,7 +1192,7 @@ Llong tracksize; if (xdebug > 1) - printf("-->Newtrack %2.2d Trackno %2.2d\n", track, sp->trackno); + 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; @@ -1247,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); @@ -1281,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 } @@ -1340,20 +1345,20 @@ } if (xdebug > 1) { - printf("Track[%2.2d] %2.2d Tracktype %X\n", + printf(_("Track[%2.2d] %2.2d Tracktype %X\n"), 0, 0, trackp[0].tracktype); } } if (xdebug > 1) { - printf("Track[%2.2d] %2.2d Tracktype %X\n", + 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[%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); + 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); } } @@ -1417,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); @@ -1557,9 +1562,9 @@ if ((olinep == nlinep) || (*nlinep == '\0')) { if (type == NULL) - cueabort("Missing text"); + cueabort(_("Missing text")); else - cueabort("Missing '%s'", type); + cueabort(_("Missing '%s'"), type); } return (nlinep); @@ -1603,7 +1608,7 @@ checkextra() { if (peekword() < lineend()) - cueabort("Extra text '%s'", peekword()); + cueabort(_("Extra text '%s'"), peekword()); } /* VARARGS2 */ @@ -1625,7 +1630,7 @@ #else va_start(args); #endif - errmsgno(EX_BAD, "%r. Current state is '%s'.\n", + errmsgno(EX_BAD, _("%r. Current state is '%s'.\n"), fmt, args, state_name(sp->state)); va_end(args); } @@ -1649,7 +1654,7 @@ #else va_start(args); #endif - errmsgno(EX_BAD, "%r on line %d col %d in '%s'.\n", + errmsgno(EX_BAD, _("%r on line %d col %d in '%s'.\n"), fmt, args, lineno, linep - linebuf, fname); va_end(args); } @@ -1674,9 +1679,9 @@ va_start(args); #endif #ifdef PARSE_DEBUG - errmsgno(EX_BAD, "%r on line %d col %d in '%s'.\n", + 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", + comerrno(EX_BAD, _("%r on line %d col %d in '%s'.\n"), #endif fmt, args, lineno, linep - linebuf, fname); va_end(args); @@ -1700,9 +1705,9 @@ #else va_start(args); #endif - errmsgno(EX_BAD, "Unsupported by CDRWIN: %r on line %d col %d in '%s'.\n", + 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"); + errmsgno(EX_BAD, _("Add 'REM CDRTOOLS' to enable cdrtools specific CUE extensions.\n")); comexit(EX_BAD); } diff -Nru cdrtools-3.00~trusty~mc3man1/cdrecord/diskid.c cdrtools-3.01a26~trusty/cdrecord/diskid.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/diskid.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/diskid.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)diskid.c 1.43 09/07/10 Copyright 1998-2009 J. Schilling */ +/* @(#)diskid.c 1.44 10/12/19 Copyright 1998-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)diskid.c 1.43 09/07/10 Copyright 1998-2009 J. Schilling"; + "@(#)diskid.c 1.44 10/12/19 Copyright 1998-2010 J. Schilling"; #endif /* * Disk Idientification Method * - * Copyright (c) 1998-2009 J. Schilling + * Copyright (c) 1998-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -27,6 +27,7 @@ #include #include #include +#include #include "cdrecord.h" @@ -370,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; @@ -391,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-3.00~trusty~mc3man1/cdrecord/drv_7501.c cdrtools-3.01a26~trusty/cdrecord/drv_7501.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/drv_7501.c 2010-02-03 20:46:54.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/drv_7501.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)drv_7501.c 1.29 10/02/03 Copyright 2003-2010 J. Schilling */ +/* @(#)drv_7501.c 1.30 10/12/19 Copyright 2003-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)drv_7501.c 1.29 10/02/03 Copyright 2003-2010 J. Schilling"; + "@(#)drv_7501.c 1.30 10/12/19 Copyright 2003-2010 J. Schilling"; #endif /* * Device driver for the Masushita CW-7501 @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -381,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); @@ -420,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); } @@ -494,7 +495,7 @@ 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); /* @@ -517,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)); } @@ -533,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); } @@ -547,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; } @@ -592,7 +593,7 @@ 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); } @@ -619,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); } @@ -632,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); /* @@ -683,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); } @@ -696,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); @@ -886,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); } } @@ -902,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); } @@ -1019,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-3.00~trusty~mc3man1/cdrecord/drv_bd.c cdrtools-3.01a26~trusty/cdrecord/drv_bd.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/drv_bd.c 2010-05-17 21:16:59.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/drv_bd.c 2013-12-09 23:03:30.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)drv_bd.c 1.19 10/05/17 Copyright 2007-2010 J. Schilling */ +/* @(#)drv_bd.c 1.21 13/12/10 Copyright 2007-2013 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)drv_bd.c 1.19 10/05/17 Copyright 2007-2010 J. Schilling"; + "@(#)drv_bd.c 1.21 13/12/10 Copyright 2007-2013 J. Schilling"; #endif /* - * Copyright (c) 2007-2010 J. Schilling + * Copyright (c) 2007-2013 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. @@ -55,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. @@ -77,6 +81,7 @@ #include #include #include +#include #include #include @@ -350,7 +355,7 @@ 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; @@ -359,7 +364,7 @@ } 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); } @@ -416,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); } @@ -599,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) { @@ -621,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); @@ -747,7 +752,7 @@ */ 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"); + errmsgno(EX_BAD, _("Cannot read BD structure.\n")); return (drive_getdisktype(scgp, dp)); } len = a_to_u_2_byte(mode); @@ -777,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)); } @@ -808,7 +813,7 @@ #endif if ((Int32_t)end_lba > dsp->ds_maxblocks) { if (maxblocks == 0) - printf("WARNING: Drive returns zero media size, correcting.\n"); + printf(_("WARNING: Drive returns zero media size, correcting.\n")); dsp->ds_maxblocks = end_lba + 1; } @@ -849,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) @@ -860,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) @@ -886,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); } @@ -905,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); } } @@ -933,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; @@ -1028,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; @@ -1051,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) @@ -1079,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); /* @@ -1127,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); @@ -1140,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); @@ -1153,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); @@ -1204,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) @@ -1240,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) { @@ -1260,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); @@ -1307,7 +1312,7 @@ 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--; scg_settimeout(scgp, oldtimeout); return (-1); @@ -1329,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); @@ -1379,7 +1384,7 @@ 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--; scg_settimeout(scgp, oldtimeout); return (-1); @@ -1410,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); @@ -1431,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); @@ -1522,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; @@ -1531,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); } } @@ -1555,7 +1560,7 @@ } } if (blocks == 0) { - errmsgno(EX_BAD, "BD-RE Full format with spares, capacity not found.\n"); + errmsgno(EX_BAD, _("BD-RE Full format with spares, capacity not found.\n")); return (-1); } @@ -1572,14 +1577,14 @@ 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; @@ -1598,15 +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); + prtimediff(_("Format WAIT time: "), &stoptime, &stoptime2); + prtimediff(_("Format time TOTAL: "), &starttime, &stoptime2); #endif return (0); } @@ -1652,7 +1657,7 @@ if (lverbose && (sensebuf[15] & 0x80)) { printed++; - error("operation %d%% done\r", + error(_("operation %d%% done\r"), (100*(sensebuf[16] << 8 | sensebuf[17]))/(unsigned)65536); } @@ -1682,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); } } @@ -1724,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"; @@ -1745,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 @@ -1759,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'); @@ -1774,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]; @@ -1783,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; @@ -1806,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));*/ } @@ -1820,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); } @@ -1832,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); } @@ -1844,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 @@ -1871,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] == '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]); } @@ -1894,14 +1899,14 @@ 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 @@ -1917,8 +1922,8 @@ 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-3.00~trusty~mc3man1/cdrecord/drv_dvd.c cdrtools-3.01a26~trusty/cdrecord/drv_dvd.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/drv_dvd.c 2010-05-10 22:18:25.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/drv_dvd.c 2013-12-09 23:03:30.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)drv_dvd.c 1.162 10/05/11 Copyright 1998-2010 J. Schilling */ +/* @(#)drv_dvd.c 1.167 13/12/10 Copyright 1998-2013 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)drv_dvd.c 1.162 10/05/11 Copyright 1998-2010 J. Schilling"; + "@(#)drv_dvd.c 1.167 13/12/10 Copyright 1998-2013 J. Schilling"; #endif /* * DVD-R device implementation for @@ -32,7 +32,7 @@ * 2 print disk info & write parameters * 3 print log pages & dvd structure * - * Copyright (c) 1998-2010 J. Schilling + * Copyright (c) 1998-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -41,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. @@ -61,6 +63,7 @@ #include #include #include +#include #include #include @@ -270,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); } @@ -315,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; } } @@ -381,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; @@ -393,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); } @@ -478,6 +481,7 @@ if (lverbose > 2) print_logpages(scgp); + if (dsp->ds_type == DST_UNKNOWN) { profile = get_curprofile(scgp); if (profile >= 0) @@ -515,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); @@ -570,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); @@ -620,10 +624,10 @@ * Bei diesen Parametern gibt es keine Warnung. */ - 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)); @@ -634,7 +638,7 @@ * Use the information from ADIP instead. */ if (dsp->ds_maxblocks == 0) { - printf("WARNING: Drive returns zero media size. Using media size from ADIP.\n"); + 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; } } @@ -673,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) @@ -684,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); } @@ -708,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); /* @@ -726,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); } } @@ -754,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; @@ -850,7 +854,7 @@ 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; @@ -883,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) @@ -911,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); /* @@ -949,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); @@ -962,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); @@ -975,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); @@ -1025,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) @@ -1063,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) { @@ -1083,9 +1087,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); } @@ -1115,9 +1119,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); return (0); @@ -1147,7 +1151,7 @@ #ifdef DVD_DEBUG request_sense_b(scgp, (caddr_t)sensebuf, sizeof (sensebuf)); #ifdef XXX - scg_prbytes("Sense:", sensebuf, sizeof (sensebuf)); + 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); @@ -1165,7 +1169,7 @@ */ if (sensebuf[15] & 0x80) { - error("operation %d%% done\n", + error(_("operation %d%% done\n"), (100*(sensebuf[16] << 8 | sensebuf[17]))/(unsigned)65536); } @@ -1198,7 +1202,7 @@ scg_settimeout(scgp, 1000); if (scsi_flush_cache(scgp, FALSE) < 0) { - printf("Trouble flushing the cache\n"); + printf(_("Trouble flushing the cache\n")); scg_settimeout(scgp, oldtimeout); return (-1); } @@ -1254,7 +1258,7 @@ 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(); } @@ -1278,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); } } @@ -1425,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); } @@ -1436,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); } @@ -1656,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 @@ -1699,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); } } @@ -1707,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 @@ -1728,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) @@ -1769,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) @@ -1784,13 +1788,13 @@ 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); } @@ -1815,22 +1819,22 @@ 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)); } @@ -1845,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 @@ -1863,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'); @@ -1878,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]; @@ -1887,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; @@ -1910,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));*/ } @@ -1918,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]); } } @@ -1933,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);*/ @@ -1944,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); } /* @@ -1966,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); @@ -1983,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); @@ -2000,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); @@ -2017,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); @@ -2032,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); @@ -2047,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); @@ -2062,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); @@ -2077,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); @@ -2096,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); @@ -2105,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++; @@ -2114,7 +2118,7 @@ scgp->verbose--; if (lverbose > 2) - printf("Leaving DVD info.\n"); + printf(_("Leaving DVD info.\n")); } LOCAL void @@ -2145,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'); @@ -2157,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'); @@ -2169,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-3.00~trusty~mc3man1/cdrecord/drv_dvdplus.c cdrtools-3.01a26~trusty/cdrecord/drv_dvdplus.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/drv_dvdplus.c 2010-05-17 20:09:43.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/drv_dvdplus.c 2012-03-15 23:34:36.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)drv_dvdplus.c 1.61 10/05/17 Copyright 2003-2010 J. Schilling */ +/* @(#)drv_dvdplus.c 1.65 12/03/16 Copyright 2003-2012 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)drv_dvdplus.c 1.61 10/05/17 Copyright 2003-2010 J. Schilling"; + "@(#)drv_dvdplus.c 1.65 12/03/16 Copyright 2003-2012 J. Schilling"; #endif /* - * Copyright (c) 2003-2010 J. Schilling + * Copyright (c) 2003-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -77,6 +77,7 @@ #include #include #include +#include #include #include @@ -310,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; @@ -374,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); } @@ -421,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; } } @@ -487,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; @@ -495,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); } @@ -583,6 +584,7 @@ /* if (lverbose > 2)*/ /* print_logpages(scgp);*/ + if (dsp->ds_type == DST_UNKNOWN) { profile = get_curprofile(scgp); if (profile >= 0) @@ -633,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); @@ -693,7 +695,7 @@ dsp->ds_flags |= DSF_DVD_PLUS_RW; /* This is a DVD+RW */ 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", + printf(_("WARNING: Drive returns illegal Disk type %s.\n"), get_ses_type(dip->disk_type)); } dsp->ds_flags |= DSF_NEED_FORMAT; @@ -768,7 +770,7 @@ if (read_dvd_structure(scgp, (caddr_t)mode, 2, 0, 0, 0, 0) < 0) { scgp->silent--; if (lverbose > 2) - errmsgno(EX_BAD, "Cannot read DVD structure 00.\n"); + errmsgno(EX_BAD, _("Cannot read DVD structure 00.\n")); return (drive_getdisktype(scgp, dp)); } scgp->silent--; @@ -821,7 +823,7 @@ error("MAXBLOx1 %d\n", dsp->ds_maxblocks); #endif if ((long)dsp->ds_maxblocks == 0) { - printf("WARNING: Drive returns zero media size. Using media size from ADIP.\n"); + 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; } } @@ -841,7 +843,7 @@ */ if ((Int32_t)end_lba > dsp->ds_maxblocks) { if (maxblocks == 0) - printf("WARNING: Drive returns zero media size, correcting.\n"); + printf(_("WARNING: Drive returns zero media size, correcting.\n")); dsp->ds_maxblocks = end_lba + 1; } @@ -879,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) @@ -895,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 */ @@ -918,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); } @@ -935,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); } } @@ -963,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; @@ -1060,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; @@ -1084,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) @@ -1114,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); /* @@ -1167,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); @@ -1180,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); @@ -1193,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); @@ -1244,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) @@ -1280,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) { @@ -1300,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); } @@ -1310,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); @@ -1347,7 +1349,7 @@ 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--; scg_settimeout(scgp, oldtimeout); return (-1); @@ -1368,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); @@ -1416,7 +1418,7 @@ 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--; scg_settimeout(scgp, oldtimeout); return (-1); @@ -1447,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); @@ -1468,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); @@ -1497,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); @@ -1540,7 +1542,7 @@ /* return (blank_dummy(scgp, dp, addr, blanktype));*/ if (!dvdplus_ricohbased(scgp)) { - errmsgno(EX_BAD, "Cannot blank DVD+RW media 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); @@ -1559,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) { @@ -1653,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); } } @@ -1674,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); } @@ -1698,7 +1700,7 @@ /* * XXX evt. restart Format ansagen... */ - printf("Formatting media\n"); + printf(_("Formatting media\n")); flush(); } starttime.tv_sec = 0; @@ -1793,7 +1795,7 @@ if (lverbose && (sensebuf[15] & 0x80)) { printed++; - error("operation %d%% done\r", + error(_("operation %d%% done\r"), (100*(sensebuf[16] << 8 | sensebuf[17]))/(unsigned)65536); } @@ -1823,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); } } @@ -1895,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); } @@ -1912,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); } diff -Nru cdrtools-3.00~trusty~mc3man1/cdrecord/drv_jvc.c cdrtools-3.01a26~trusty/cdrecord/drv_jvc.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/drv_jvc.c 2010-05-10 22:12:03.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/drv_jvc.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,8 +1,8 @@ -/** @(#)drv_jvc.c 1.94 10/05/11 Copyright 1997-2010 J. Schilling */ +/** @(#)drv_jvc.c 1.95 10/12/19 Copyright 1997-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)drv_jvc.c 1.94 10/05/11 Copyright 1997-2010 J. Schilling"; + "@(#)drv_jvc.c 1.95 10/12/19 Copyright 1997-2010 J. Schilling"; #endif /* * CDR device implementation for @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -502,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); } @@ -517,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) @@ -529,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); } /* @@ -558,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); @@ -572,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) @@ -583,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); } @@ -599,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) @@ -619,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 ? @@ -732,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; @@ -794,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)); @@ -812,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); @@ -843,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); } } @@ -878,7 +879,7 @@ int status; if (lverbose) { - fprintf(stdout, "Judging disk..."); + fprintf(stdout, _("Judging disk...")); flush(); } status = opt_power_judge(scgp, 1); @@ -887,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 @@ -1153,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++) { @@ -1197,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"; @@ -1207,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); } @@ -1223,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(); } @@ -1252,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); @@ -1292,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);*/ @@ -1348,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]));*/ } @@ -1408,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]);*/ @@ -1448,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]);*/ @@ -1472,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-3.00~trusty~mc3man1/cdrecord/drv_mmc.c cdrtools-3.01a26~trusty/cdrecord/drv_mmc.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/drv_mmc.c 2010-05-10 22:22:43.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/drv_mmc.c 2012-03-15 23:34:36.000000000 +0000 @@ -1,15 +1,15 @@ -/* @(#)drv_mmc.c 1.198 10/05/11 Copyright 1997-2010 J. Schilling */ +/* @(#)drv_mmc.c 1.200 12/03/16 Copyright 1997-2012 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)drv_mmc.c 1.198 10/05/11 Copyright 1997-2010 J. Schilling"; + "@(#)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-2010 J. Schilling + * Copyright (c) 1997-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -404,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"); @@ -579,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); } @@ -2860,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); @@ -2871,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); diff -Nru cdrtools-3.00~trusty~mc3man1/cdrecord/drv_philips.c cdrtools-3.01a26~trusty/cdrecord/drv_philips.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/drv_philips.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/drv_philips.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,14 +1,14 @@ -/* @(#)drv_philips.c 1.81 09/07/10 Copyright 1997-2009 J. Schilling */ +/* @(#)drv_philips.c 1.82 10/12/19 Copyright 1997-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)drv_philips.c 1.81 09/07/10 Copyright 1997-2009 J. Schilling"; + "@(#)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-2009 J. Schilling + * Copyright (c) 1997-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -749,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); } @@ -799,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); } @@ -836,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)); } @@ -850,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); @@ -878,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) @@ -924,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); @@ -955,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)); @@ -972,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; } @@ -1398,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); @@ -1431,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-3.00~trusty~mc3man1/cdrecord/drv_simul.c cdrtools-3.01a26~trusty/cdrecord/drv_simul.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/drv_simul.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/drv_simul.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)drv_simul.c 1.60 09/07/10 Copyright 1998-2009 J. Schilling */ +/* @(#)drv_simul.c 1.61 10/12/19 Copyright 1998-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)drv_simul.c 1.60 09/07/10 Copyright 1998-2009 J. Schilling"; + "@(#)drv_simul.c 1.61 10/12/19 Copyright 1998-2010 J. Schilling"; #endif /* * Simulation device driver * - * Copyright (c) 1998-2009 J. Schilling + * Copyright (c) 1998-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -36,6 +36,7 @@ #include #include #include +#include /*#include */ #include @@ -305,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); @@ -345,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; @@ -359,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, @@ -434,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-3.00~trusty~mc3man1/cdrecord/drv_sony.c cdrtools-3.01a26~trusty/cdrecord/drv_sony.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/drv_sony.c 2010-02-03 20:46:54.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/drv_sony.c 2012-03-15 23:34:36.000000000 +0000 @@ -1,14 +1,14 @@ -/* @(#)drv_sony.c 1.87 10/02/03 Copyright 1997-2010 J. Schilling */ +/* @(#)drv_sony.c 1.89 12/03/16 Copyright 1997-2012 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)drv_sony.c 1.87 10/02/03 Copyright 1997-2010 J. Schilling"; + "@(#)drv_sony.c 1.89 12/03/16 Copyright 1997-2012 J. Schilling"; #endif /* * CDR device implementation for * Sony * - * Copyright (c) 1997-2010 J. Schilling + * Copyright (c) 1997-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -435,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'); @@ -575,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) @@ -607,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]; @@ -621,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) { @@ -781,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); @@ -826,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); @@ -888,7 +889,7 @@ 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); } @@ -963,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; } @@ -1009,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); @@ -1205,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); } } @@ -1221,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); } @@ -1245,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); @@ -1339,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; } } @@ -1428,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-3.00~trusty~mc3man1/cdrecord/fifo.c cdrtools-3.01a26~trusty/cdrecord/fifo.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/fifo.c 2010-02-12 19:38:36.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/fifo.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)fifo.c 1.64 10/02/12 Copyright 1989,1997-2010 J. Schilling */ +/* @(#)fifo.c 1.65 10/12/19 Copyright 1989,1997-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)fifo.c 1.64 10/02/12 Copyright 1989,1997-2010 J. Schilling"; + "@(#)fifo.c 1.65 10/12/19 Copyright 1989,1997-2010 J. Schilling"; #endif /* * A "fifo" that uses shared memory between two processes @@ -82,6 +82,7 @@ #include #include #include +#include #include #include "cdrecord.h" @@ -260,16 +261,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); @@ -300,18 +301,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 /* @@ -319,7 +320,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); @@ -339,9 +340,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); @@ -366,9 +367,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); } @@ -387,7 +388,7 @@ B_ANY_ADDRESS, B_READ_AREA|B_WRITE_AREA, faio_aid); if (bufbase != faio_addr) { - comerrno(EX_BAD, "Panic FIFO addr.\n"); + comerrno(EX_BAD, _("Panic FIFO addr.\n")); /* NOTREACHED */ } } @@ -460,13 +461,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), @@ -485,7 +486,7 @@ faio_pid = fork(); if (faio_pid < 0) - comerr("fork(2) failed"); + comerr(_("fork(2) failed")); if (faio_pid == 0) { /* @@ -540,7 +541,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(); } @@ -548,7 +549,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 */ @@ -557,7 +558,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); } @@ -590,18 +591,18 @@ Uint trackno; if (debug) - printf("\nfaio_reader starting\n"); + printf(_("\nfaio_reader starting\n")); 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) @@ -613,7 +614,7 @@ /* XXX This should be fixed soon */ #endif if (debug) - error("\nfaio_reader _exit(0)\n"); + error(_("\nfaio_reader _exit(0)\n")); _exit(0); } @@ -645,7 +646,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); } @@ -709,10 +710,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]); } @@ -789,12 +790,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); } @@ -815,9 +816,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); } @@ -842,6 +843,7 @@ #include #include /* includes sys/types.h */ #include +#include #include "cdrecord.h" @@ -860,7 +862,7 @@ init_fifo(fs) long fs; { - errmsgno(EX_BAD, "Fifo not supported.\n"); + errmsgno(EX_BAD, _("Fifo not supported.\n")); return (0L); } diff -Nru cdrtools-3.00~trusty~mc3man1/cdrecord/Makefile cdrtools-3.01a26~trusty/cdrecord/Makefile --- cdrtools-3.00~trusty~mc3man1/cdrecord/Makefile 2008-12-26 20:10:32.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/Makefile 2013-04-21 18:10:14.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile 1.49 08/12/26 Copyr 1995-2008 J. Schilling +#ident @(#)Makefile 1.53 13/04/21 Copyr 1995-2013 J. Schilling ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -12,6 +12,7 @@ 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 @@ -19,8 +20,11 @@ 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 \ @@ -37,7 +41,7 @@ vendor.c \ scsi_scan.c scsi_cdr.c scsi_cdr_mmc4.c scsi_mmc.c scsi_mmc4.c \ scsilog.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 \ @@ -47,7 +51,10 @@ HFILES_TAG= ../include/scg/scgio.h ../include/scg/scsidefs.h \ ../include/scg/scsireg.h ../include/scg/scsitransp.h #LIBS= -lschily $(LIB_SOCKET) -LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -ledc_ecc -lcdrdeflt -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-3.00~trusty~mc3man1/cdrecord/misc.c cdrtools-3.01a26~trusty/cdrecord/misc.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/misc.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/misc.c 2014-02-17 22:57:38.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)misc.c 1.8 09/07/10 Copyright 1998, 2001-2009 J. Schilling */ +/* @(#)misc.c 1.9 14/02/17 Copyright 1998, 2001-2014 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)misc.c 1.8 09/07/10 Copyright 1998, 2001-2009 J. Schilling"; + "@(#)misc.c 1.9 14/02/17 Copyright 1998, 2001-2014 J. Schilling"; #endif /* * Misc support functions * - * Copyright (c) 1998, 2001-2009 J. Schilling + * Copyright (c) 1998, 2001-2014 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -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. @@ -74,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-3.00~trusty~mc3man1/cdrecord/priv.c cdrtools-3.01a26~trusty/cdrecord/priv.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/priv.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/cdrecord/README cdrtools-3.01a26~trusty/cdrecord/README --- cdrtools-3.00~trusty~mc3man1/cdrecord/README 2008-10-12 19:12:20.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/README 2014-12-03 19:06:31.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)README 1.26 08/10/12 Copyright 1996-2002 J. Schilling +# @(#)README 1.27 14/12/03 Copyright 1996-2002 J. Schilling This is Version 2.0 of cdrecord @@ -45,7 +45,8 @@ 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 +from https://sourceforge.net/projects/s-make/files/ or +https://sourceforge.net/projects/schilytools/files/ GNUmake is too dump to do this job as it does not include automake features like 'smake' does. @@ -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://cdrecord.berlios.de/private/cdrecord.html + http://cdrecord.org/private/cdrecord.html Joerg Schilling diff -Nru cdrtools-3.00~trusty~mc3man1/cdrecord/README.verify cdrtools-3.01a26~trusty/cdrecord/README.verify --- cdrtools-3.00~trusty~mc3man1/cdrecord/README.verify 2002-12-16 20:53:56.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/cdrecord/scsi_cdr.c cdrtools-3.01a26~trusty/cdrecord/scsi_cdr.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/scsi_cdr.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/scsi_cdr.c 2012-03-15 23:34:36.000000000 +0000 @@ -1,14 +1,14 @@ -/* @(#)scsi_cdr.c 1.158 09/07/10 Copyright 1995-2009 J. Schilling */ +/* @(#)scsi_cdr.c 1.160 12/03/16 Copyright 1995-2012 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)scsi_cdr.c 1.158 09/07/10 Copyright 1995-2009 J. Schilling"; + "@(#)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-2009 J. Schilling + * Copyright (c) 1995-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -383,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); } @@ -437,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 @@ -1065,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); @@ -1344,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); @@ -1476,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)); } @@ -1532,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); } @@ -1558,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"; @@ -1589,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"; @@ -1628,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); } @@ -1660,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); } @@ -1730,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; @@ -1758,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); } { @@ -1796,7 +1797,7 @@ 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; @@ -1884,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); @@ -1892,7 +1893,7 @@ pe = &xb[len]; while ((char *)tp < pe) { - scg_prbytes("ENT: ", (Uchar *)tp, 11); + scg_prbytes(_("ENT: "), (Uchar *)tp, 11); tp++; } } @@ -1919,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), @@ -1932,7 +1933,7 @@ } if (scgp->verbose) - printf("B0 lout: %ld\n", l); + printf(("B0 lout: %ld\n"), l); if (lop) *lop = l; return (0); @@ -1960,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; @@ -2000,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) @@ -2054,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]); } @@ -2073,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; @@ -2228,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); } @@ -2270,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) @@ -2281,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. @@ -2303,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; @@ -2315,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) { @@ -2364,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; @@ -2604,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 "); @@ -2622,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); } } @@ -2635,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; @@ -2683,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; } @@ -2749,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 && (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); } @@ -2791,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) { @@ -2942,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) @@ -2974,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) { @@ -3060,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-3.00~trusty~mc3man1/cdrecord/scsi_cdr_mmc4.c cdrtools-3.01a26~trusty/cdrecord/scsi_cdr_mmc4.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/scsi_cdr_mmc4.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/scsi_cdr_mmc4.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,14 +1,14 @@ -/* @(#)scsi_cdr_mmc4.c 1.6 09/07/10 Copyright 1995-2009 J. Schilling */ +/* @(#)scsi_cdr_mmc4.c 1.7 10/12/19 Copyright 1995-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)scsi_cdr_mmc4.c 1.6 09/07/10 Copyright 1995-2009 J. Schilling"; + "@(#)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-2009 J. Schilling + * Copyright (c) 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -48,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 @@ -62,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-3.00~trusty~mc3man1/cdrecord/scsilog.c cdrtools-3.01a26~trusty/cdrecord/scsilog.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/scsilog.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/scsilog.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)scsilog.c 1.24 09/07/10 Copyright 1998-2009 J. Schilling */ +/* @(#)scsilog.c 1.25 10/12/19 Copyright 1998-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)scsilog.c 1.24 09/07/10 Copyright 1998-2009 J. Schilling"; + "@(#)scsilog.c 1.25 10/12/19 Copyright 1998-2010 J. Schilling"; #endif /* * SCSI log page handling * - * Copyright (c) 1998-2009 J. Schilling + * Copyright (c) 1998-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -75,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); } @@ -164,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-3.00~trusty~mc3man1/cdrecord/scsi_mmc.c cdrtools-3.01a26~trusty/cdrecord/scsi_mmc.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/scsi_mmc.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/scsi_mmc.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,14 +1,14 @@ -/* @(#)scsi_mmc.c 1.50 09/07/10 Copyright 2002-2009 J. Schilling */ +/* @(#)scsi_mmc.c 1.51 10/12/19 Copyright 2002-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)scsi_mmc.c 1.50 09/07/10 Copyright 2002-2009 J. Schilling"; + "@(#)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-2009 J. Schilling + * Copyright (c) 2002-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -313,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); @@ -378,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; @@ -404,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 */ @@ -424,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); @@ -464,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 */ @@ -750,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; @@ -777,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); @@ -842,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; @@ -876,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: @@ -915,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; @@ -944,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 } @@ -1009,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)); @@ -1122,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 */ @@ -1136,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"); } @@ -1191,14 +1192,14 @@ 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. Format-type 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); @@ -1277,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 @@ -1331,13 +1332,13 @@ #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"; @@ -1370,51 +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: "); + 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")); } } @@ -1445,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)); } } @@ -1458,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'); @@ -1483,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); @@ -1492,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); @@ -1581,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-3.00~trusty~mc3man1/cdrecord/scsi_scan.c cdrtools-3.01a26~trusty/cdrecord/scsi_scan.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/scsi_scan.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/scsi_scan.c 2012-03-15 23:34:36.000000000 +0000 @@ -1,15 +1,15 @@ -/* @(#)scsi_scan.c 1.34 09/07/10 Copyright 1997-2009 J. Schilling */ +/* @(#)scsi_scan.c 1.36 12/03/16 Copyright 1997-2012 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)scsi_scan.c 1.34 09/07/10 Copyright 1997-2009 J. Schilling"; + "@(#)scsi_scan.c 1.36 12/03/16 Copyright 1997-2012 J. Schilling"; #endif /* * Scan SCSI Bus. * Stolen from sformat. Need a more general form to * re-use it in sformat too. * - * Copyright (c) 1997-2009 J. Schilling + * Copyright (c) 1997-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -52,9 +53,9 @@ 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 "); } @@ -184,12 +185,12 @@ 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); @@ -214,7 +215,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++) { @@ -258,12 +259,12 @@ 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); diff -Nru cdrtools-3.00~trusty~mc3man1/cdrecord/sector.c cdrtools-3.01a26~trusty/cdrecord/sector.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/sector.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/sector.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)sector.c 1.17 09/07/10 Copyright 2001-2009 J. Schilling */ +/* @(#)sector.c 1.18 10/12/19 Copyright 2001-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)sector.c 1.17 09/07/10 Copyright 2001-2009 J. Schilling"; + "@(#)sector.c 1.18 10/12/19 Copyright 2001-2010 J. Schilling"; #endif /* * Functions needed to use libedc_ecc from cdrecord * - * Copyright (c) 2001-2009 J. Schilling + * Copyright (c) 2001-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -27,6 +27,7 @@ #include #include #include +#include #include "cdrecord.h" #include "movesect.h" @@ -122,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); } @@ -192,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-3.00~trusty~mc3man1/cdrecord/subchan.c cdrtools-3.01a26~trusty/cdrecord/subchan.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/subchan.c 2010-02-03 21:07:06.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/subchan.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)subchan.c 1.27 10/02/03 Copyright 2000-2010 J. Schilling */ +/* @(#)subchan.c 1.28 10/12/19 Copyright 2000-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)subchan.c 1.27 10/02/03 Copyright 2000-2010 J. Schilling"; + "@(#)subchan.c 1.28 10/12/19 Copyright 2000-2010 J. Schilling"; #endif /* * Subchannel processing @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -95,14 +96,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 @@ -206,13 +207,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); } @@ -270,7 +271,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); } @@ -328,11 +329,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); } @@ -377,7 +378,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); } @@ -439,7 +440,7 @@ 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))) { @@ -919,7 +920,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 @@ -929,7 +930,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-3.00~trusty~mc3man1/cdrecord/vendor.c cdrtools-3.01a26~trusty/cdrecord/vendor.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/vendor.c 2010-05-24 10:19:11.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/vendor.c 2011-09-14 11:46:45.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)vendor.c 1.5 10/05/24 Copyright 2007-2010 J. Schilling */ +/* @(#)vendor.c 1.8 11/09/14 Copyright 2007-2011 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)vendor.c 1.5 10/05/24 Copyright 2007-2010 J. Schilling"; + "@(#)vendor.c 1.8 11/09/14 Copyright 2007-2011 J. Schilling"; #endif /* * Vendor specific SCSI command functions for cdrecord * - * Copyright (c) 2007-2010 J. Schilling + * Copyright (c) 2007-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -42,3 +42,4 @@ #include "scsimmc.h" #include "cdrecord.h" + diff -Nru cdrtools-3.00~trusty~mc3man1/cdrecord/version.h cdrtools-3.01a26~trusty/cdrecord/version.h --- cdrtools-3.00~trusty~mc3man1/cdrecord/version.h 2010-06-01 22:07:33.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/version.h 2015-01-01 14:17:56.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)version.h 1.55 10/06/02 Copyright 2007-2010 J. Schilling */ +/* @(#)version.h 1.80 15/01/01 Copyright 2007-2015 J. Schilling */ /* * The version for cdrtools programs */ -#define VERSION "3.00" +#define VERSION "3.01a26" diff -Nru cdrtools-3.00~trusty~mc3man1/cdrecord/wm_packet.c cdrtools-3.01a26~trusty/cdrecord/wm_packet.c --- cdrtools-3.00~trusty~mc3man1/cdrecord/wm_packet.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/cdrecord/wm_packet.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,14 +1,14 @@ -/* @(#)wm_packet.c 1.30 09/07/10 Copyright 1995, 1997, 2001-2009 J. Schilling */ +/* @(#)wm_packet.c 1.31 10/12/19 Copyright 1995, 1997, 2001-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)wm_packet.c 1.30 09/07/10 Copyright 1995, 1997, 2001-2009 J. Schilling"; + "@(#)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-2009 J. Schilling + * Copyright (c) 1995, 1997, 2001-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "cdrecord.h" @@ -110,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; } @@ -136,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; @@ -148,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; } @@ -156,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; } } @@ -198,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); } @@ -217,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); @@ -286,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; } @@ -295,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-3.00~trusty~mc3man1/COMPILE cdrtools-3.01a26~trusty/COMPILE --- cdrtools-3.00~trusty~mc3man1/COMPILE 2010-05-15 16:06:27.000000000 +0000 +++ cdrtools-3.01a26~trusty/COMPILE 2014-12-03 19:11:38.000000000 +0000 @@ -22,7 +22,7 @@ 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 @@ -48,19 +48,19 @@ 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 - Replace 'star' 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 @@ -106,8 +106,8 @@ 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 + 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. @@ -165,12 +165,13 @@ 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 is stored inside the + that compiles or links programs, as the path is stored inside the binaries. The location for the root specific configuratin files is controlled @@ -184,6 +185,41 @@ 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 in a different ELF RUNPATH: In order to allow binaries to work correctly even if the shared @@ -199,14 +235,14 @@ Using a different man path prefix: - Man Pages are by default installed under: + 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=soething install + smake DEFMANBASE=something install to install man pages into $(INS_BASE)/something/man/* @@ -255,13 +291,13 @@ smake DEFINSUMASK=002 install -Using a different C-compiler: +Using a different C compiler: 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. + 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 C-compiler can be modified in the files in the + The default C compiler can be modified in the files in the DEFAULT directory. If you want to have a different compiler for one compilation, call: @@ -320,7 +356,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: @@ -340,14 +376,14 @@ export MAKEPROG exec gmake "$@" - and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make' + and call 'Gmake' instead of gmake. On Linux, there is no gmake, '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: @@ -355,7 +391,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: @@ -366,7 +402,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 @@ -377,8 +413,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 @@ -397,15 +433,38 @@ make clean make COPTX=-g LDOPTX=-g + If your debugger does not like optimized binaries, call something + like: -Creting Blastwave packages: + make "COPTX=-g -xO0" LDOPTX=-g + or + make "COPTX=-g -O0" LDOPTX=-g + + depending on the option system of 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 + + depending on the option system of 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 @@ -417,7 +476,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 @@ -430,6 +489,112 @@ 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 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 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_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 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" + + + Author: Joerg Schilling @@ -438,6 +603,6 @@ Germany Email: joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de - joerg.schilling@fokus.fraunhufer.de + joerg.schilling@fokus.fraunhofer.de Please mail bugs and suggestions to me. diff -Nru cdrtools-3.00~trusty~mc3man1/conf/cc-config.sh cdrtools-3.01a26~trusty/conf/cc-config.sh --- cdrtools-3.00~trusty~mc3man1/conf/cc-config.sh 2007-02-13 14:39:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/conf/makeinc cdrtools-3.01a26~trusty/conf/makeinc --- cdrtools-3.00~trusty~mc3man1/conf/makeinc 2008-10-12 18:15:19.000000000 +0000 +++ cdrtools-3.01a26~trusty/conf/makeinc 2014-03-24 16:50:49.000000000 +0000 @@ -1,8 +1,8 @@ #!/bin/sh # -# @(#)makeinc 1.5 08/10/12 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,10 +11,13 @@ # # 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 @@ -23,6 +26,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. @@ -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-3.00~trusty~mc3man1/conf/mkdep-hpux.sh cdrtools-3.01a26~trusty/conf/mkdep-hpux.sh --- cdrtools-3.00~trusty~mc3man1/conf/mkdep-hpux.sh 2002-10-10 20:59:43.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/conf/mkdep-msc.sh cdrtools-3.01a26~trusty/conf/mkdep-msc.sh --- cdrtools-3.00~trusty~mc3man1/conf/mkdep-msc.sh 2006-10-10 14:50:58.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/conf/post.html cdrtools-3.01a26~trusty/conf/post.html --- cdrtools-3.00~trusty~mc3man1/conf/post.html 2008-10-12 19:16:22.000000000 +0000 +++ cdrtools-3.01a26~trusty/conf/post.html 2014-12-03 21:23:08.000000000 +0000 @@ -1,11 +1,10 @@


FhG FhG FOKUS -BerliOS - + Schily -Schily's Home -VED powered +Schily's Home +VED powered diff -Nru cdrtools-3.00~trusty~mc3man1/conf/runrmt_android cdrtools-3.01a26~trusty/conf/runrmt_android --- cdrtools-3.00~trusty~mc3man1/conf/runrmt_android 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/conf/runrmt_rsh cdrtools-3.01a26~trusty/conf/runrmt_rsh --- cdrtools-3.00~trusty~mc3man1/conf/runrmt_rsh 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/conf/runrmt_ssh cdrtools-3.01a26~trusty/conf/runrmt_ssh --- cdrtools-3.00~trusty~mc3man1/conf/runrmt_ssh 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/conf/setup.sh cdrtools-3.01a26~trusty/conf/setup.sh --- cdrtools-3.00~trusty~mc3man1/conf/setup.sh 2010-05-01 13:53:59.000000000 +0000 +++ cdrtools-3.01a26~trusty/conf/setup.sh 2014-12-09 19:25:36.000000000 +0000 @@ -1,5 +1,5 @@ #!/bin/sh -# @(#)setup.sh 1.17 10/05/01 Copyright 2005 J. Schilling +# @(#)setup.sh 1.18 14/12/09 Copyright 2005 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. @@ -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 diff -Nru cdrtools-3.00~trusty~mc3man1/configure cdrtools-3.01a26~trusty/configure --- cdrtools-3.00~trusty~mc3man1/configure 2002-12-16 20:24:33.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/CONTRIBUTING cdrtools-3.01a26~trusty/CONTRIBUTING --- cdrtools-3.00~trusty~mc3man1/CONTRIBUTING 2006-05-29 22:04:27.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/COPYING cdrtools-3.01a26~trusty/COPYING --- cdrtools-3.00~trusty~mc3man1/COPYING 2009-08-11 23:07:17.000000000 +0000 +++ cdrtools-3.01a26~trusty/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,8 +9,9 @@ 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), @@ -68,7 +72,7 @@ mkisofs/ A ISO-9660/Rock-Ridge/Joliet/HFS/UDF filesystem formatter (GPL) Note: uses libscg - See special GPL compatibility note below + See special GPL compatibility notes below readcd/ A CD/DVD read utility (CDDL) Note: uses libscg @@ -102,12 +106,25 @@ 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 projects under different licenses. If you combine code -from different licenses, you need to honor the legal implication from the -included GPL code and the other code. +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 diff -Nru cdrtools-3.00~trusty~mc3man1/debian/changelog cdrtools-3.01a26~trusty/debian/changelog --- cdrtools-3.00~trusty~mc3man1/debian/changelog 2013-12-03 04:45:34.000000000 +0000 +++ cdrtools-3.01a26~trusty/debian/changelog 2015-01-27 22:18:32.000000000 +0000 @@ -1,3 +1,9 @@ +cdrtools (10:3.01a26~trusty) trusty; urgency=medium + + * Newer version 3.01a26 + + -- Doug McMahon Tue, 27 Jan 2015 17:17:34 -0500 + cdrtools (10:3.00~trusty~mc3man1) trusty; urgency=low * For trusty diff -Nru cdrtools-3.00~trusty~mc3man1/debian/control cdrtools-3.01a26~trusty/debian/control --- cdrtools-3.00~trusty~mc3man1/debian/control 2012-03-24 20:18:44.000000000 +0000 +++ cdrtools-3.01a26~trusty/debian/control 2015-01-27 22:19:41.000000000 +0000 @@ -4,7 +4,7 @@ Maintainer: Ubuntu MOTU Developers Uploaders: Reinhard Tartler Build-Depends: debhelper (>= 5), libacl1-dev, smake (>> 1.2a41), libklibc-dev -Standards-Version: 3.8.4 +Standards-Version: 3.9.5 XS-Vcs-Bzr: https://code.launchpad.net/~ubuntu-burning/cdrtools/ubuntu Package: cdrecord diff -Nru cdrtools-3.00~trusty~mc3man1/debian/watch cdrtools-3.01a26~trusty/debian/watch --- cdrtools-3.00~trusty~mc3man1/debian/watch 2010-02-28 19:10:04.000000000 +0000 +++ cdrtools-3.01a26~trusty/debian/watch 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# Compulsory line, this is a version 3 file -version=3 -ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-(.*)\.tar\.gz debian - diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.aix cdrtools-3.01a26~trusty/DEFAULTS/Defaults.aix --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.aix 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.aix 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.aix 1.5 09/06/04 " +#ident "@(#)Defaults.aix 1.6 13/11/04 " ########################################################################### # # global definitions for IBM AIX 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.amigaos cdrtools-3.01a26~trusty/DEFAULTS/Defaults.amigaos --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.amigaos 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.amigaos 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.amigaos 1.5 09/06/04 " +#ident "@(#)Defaults.amigaos 1.6 13/11/04 " ########################################################################### # # global definitions for AmigaOS Systems using CC=gcc @@ -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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.beos cdrtools-3.01a26~trusty/DEFAULTS/Defaults.beos --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.beos 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.beos 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.beos 1.5 09/06/04 " +#ident "@(#)Defaults.beos 1.6 13/11/04 " ########################################################################### # # global definitions for BeOS 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.bsd-os cdrtools-3.01a26~trusty/DEFAULTS/Defaults.bsd-os --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.bsd-os 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.bsd-os 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.bsd-os 1.4 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.bsd-os3 cdrtools-3.01a26~trusty/DEFAULTS/Defaults.bsd-os3 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.bsd-os3 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.bsd-os3 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.bsd-os3 1.4 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.cygwin32_nt cdrtools-3.01a26~trusty/DEFAULTS/Defaults.cygwin32_nt --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.cygwin32_nt 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.cygwin32_nt 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.cygwin32_nt 1.5 08/12/26 " +#ident "@(#)Defaults.cygwin32_nt 1.6 13/11/04 " ########################################################################### # # 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) diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.cygwin32_wow64 cdrtools-3.01a26~trusty/DEFAULTS/Defaults.cygwin32_wow64 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.cygwin32_wow64 2009-07-30 09:35:31.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.cygwin32_wow64 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "%W% %E% %Q%" +#ident "@(#)Defaults.cygwin32_wow64 1.7 13/11/04 " ########################################################################### # # 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) @@ -58,7 +59,7 @@ # _PLATFORM= cygwin VC=7 -#VC=9 +VC=9 _VC_SETUP= $(_UNIQ)$(VC_SETUP) __VC_SETUP= $(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup) diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.darwin cdrtools-3.01a26~trusty/DEFAULTS/Defaults.darwin --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.darwin 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.darwin 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.darwin 1.3 08/12/26 " +#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 ########################################################################### diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.dgux cdrtools-3.01a26~trusty/DEFAULTS/Defaults.dgux --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.dgux 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.dgux 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.dgux 1.5 09/06/04 " +#ident "@(#)Defaults.dgux 1.6 13/11/04 " ########################################################################### # # global definitions for Data General DGUX 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.dgux3 cdrtools-3.01a26~trusty/DEFAULTS/Defaults.dgux3 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.dgux3 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.dgux3 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.dgux3 1.5 09/06/04 " +#ident "@(#)Defaults.dgux3 1.6 13/11/04 " ########################################################################### # # global definitions for Data General DGUX 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.dgux4 cdrtools-3.01a26~trusty/DEFAULTS/Defaults.dgux4 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.dgux4 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.dgux4 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.dgux4 1.5 09/06/04 " +#ident "@(#)Defaults.dgux4 1.6 13/11/04 " ########################################################################### # # global definitions for Data General DGUX 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.domainos cdrtools-3.01a26~trusty/DEFAULTS/Defaults.domainos --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.domainos 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.domainos 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.domainos 1.5 09/06/04 " +#ident "@(#)Defaults.domainos 1.6 13/11/04 " ########################################################################### # # global definitions for Apollo Domain/OS Systems @@ -29,6 +29,7 @@ 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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.dragonfly cdrtools-3.01a26~trusty/DEFAULTS/Defaults.dragonfly --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.dragonfly 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.dragonfly 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.dragonfly 1.5 08/12/26 " +#ident "@(#)Defaults.dragonfly 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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.freebsd cdrtools-3.01a26~trusty/DEFAULTS/Defaults.freebsd --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.freebsd 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.freebsd 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.freebsd 1.5 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.freemint cdrtools-3.01a26~trusty/DEFAULTS/Defaults.freemint --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.freemint 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.freemint 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Defaults.freemint 1.3 08/12/26 +#ident @(#)Defaults.freemint 1.4 13/11/04 ########################################################################### # # global definitions for FreeMiNT on ATARI computers @@ -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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.gnu cdrtools-3.01a26~trusty/DEFAULTS/Defaults.gnu --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.gnu 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.gnu 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.gnu 1.5 09/06/04 " +#ident "@(#)Defaults.gnu 1.6 13/11/04 " ########################################################################### # # global definitions for GNU (hurd) Systems @@ -28,7 +28,8 @@ ########################################################################### 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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.gnu-kfreebsd cdrtools-3.01a26~trusty/DEFAULTS/Defaults.gnu-kfreebsd --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.gnu-kfreebsd 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/DEFAULTS/Defaults.haiku cdrtools-3.01a26~trusty/DEFAULTS/Defaults.haiku --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.haiku 2009-07-25 15:36:53.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.haiku 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.haiku 1.3 09/07/25 " +#ident "@(#)Defaults.haiku 1.4 13/11/04 " ########################################################################### # # global definitions for Haiku 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.hp-ux cdrtools-3.01a26~trusty/DEFAULTS/Defaults.hp-ux --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.hp-ux 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.hp-ux 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.hp-ux 1.5 09/06/04 " +#ident "@(#)Defaults.hp-ux 1.6 13/11/04 " ########################################################################### # # global definitions for HP/UX 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.interix cdrtools-3.01a26~trusty/DEFAULTS/Defaults.interix --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.interix 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.interix 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.interix 1.6 09/06/04 " +#ident "@(#)Defaults.interix 1.7 13/11/04 " ########################################################################### # # global definitions for Interix Systems (WIN-NT with SFU) using CC=gcc @@ -39,6 +39,7 @@ 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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.irix cdrtools-3.01a26~trusty/DEFAULTS/Defaults.irix --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.irix 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.irix 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.irix 1.5 09/06/04 " +#ident "@(#)Defaults.irix 1.6 13/11/04 " ########################################################################### # # global definitions for Silicon Graphics 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.linux cdrtools-3.01a26~trusty/DEFAULTS/Defaults.linux --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.linux 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.linux 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.linux 1.7 09/06/04 " +#ident "@(#)Defaults.linux 1.8 13/11/04 " ########################################################################### # # global definitions for Linux Systems @@ -47,6 +47,7 @@ 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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.mac-os10 cdrtools-3.01a26~trusty/DEFAULTS/Defaults.mac-os10 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.mac-os10 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.mac-os10 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.mac-os10 1.3 08/12/26 " +#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 ########################################################################### diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.mingw32_nt cdrtools-3.01a26~trusty/DEFAULTS/Defaults.mingw32_nt --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.mingw32_nt 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.mingw32_nt 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.mingw32_nt 1.4 08/12/26 " +#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) diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.ms-dos cdrtools-3.01a26~trusty/DEFAULTS/Defaults.ms-dos --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.ms-dos 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.ms-dos 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.ms-dos 1.5 09/06/04 " +#ident "@(#)Defaults.ms-dos 1.6 13/11/04 " ########################################################################### # # global definitions for MSDOS/DJGPP v2 Systems using CC=gcc @@ -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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.netbsd cdrtools-3.01a26~trusty/DEFAULTS/Defaults.netbsd --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.netbsd 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.netbsd 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.netbsd 1.4 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.newsos6 cdrtools-3.01a26~trusty/DEFAULTS/Defaults.newsos6 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.newsos6 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.newsos6 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.newsos6 1.5 09/06/04 " +#ident "@(#)Defaults.newsos6 1.6 13/11/04 " ########################################################################### # # global definitions for Sony NEWS-OS 6.x @@ -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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.nextstep cdrtools-3.01a26~trusty/DEFAULTS/Defaults.nextstep --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.nextstep 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.nextstep 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.nextstep 1.4 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.openbsd cdrtools-3.01a26~trusty/DEFAULTS/Defaults.openbsd --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.openbsd 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.openbsd 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.openbsd 1.4 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.openserver cdrtools-3.01a26~trusty/DEFAULTS/Defaults.openserver --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.openserver 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.openserver 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.openserver 1.3 08/12/26 " +#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= diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.openvms cdrtools-3.01a26~trusty/DEFAULTS/Defaults.openvms --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.openvms 2009-10-31 20:21:59.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.openvms 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.openvms 1.1 09/10/31 " +#ident "@(#)Defaults.openvms 1.2 13/11/04 " ########################################################################### # # global definitions for OpenVMS @@ -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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.os2 cdrtools-3.01a26~trusty/DEFAULTS/Defaults.os2 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.os2 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.os2 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.os2 1.5 09/06/04 " +#ident "@(#)Defaults.os2 1.6 13/11/04 " ########################################################################### # # global definitions for OS/2 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.osf1 cdrtools-3.01a26~trusty/DEFAULTS/Defaults.osf1 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.osf1 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.osf1 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.osf1 1.5 09/06/04 " +#ident "@(#)Defaults.osf1 1.6 13/11/04 " ########################################################################### # # global definitions for Digital UNIX (OSF1) 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.pyro cdrtools-3.01a26~trusty/DEFAULTS/Defaults.pyro --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.pyro 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/DEFAULTS/Defaults.qnx cdrtools-3.01a26~trusty/DEFAULTS/Defaults.qnx --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.qnx 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.qnx 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.qnx 1.4 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.rhapsody cdrtools-3.01a26~trusty/DEFAULTS/Defaults.rhapsody --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.rhapsody 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.rhapsody 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.rhapsody 1.3 08/12/26 " +#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 ########################################################################### diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.sunos4 cdrtools-3.01a26~trusty/DEFAULTS/Defaults.sunos4 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.sunos4 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.sunos4 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.sunos4 1.4 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.sunos5 cdrtools-3.01a26~trusty/DEFAULTS/Defaults.sunos5 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.sunos5 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.sunos5 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.sunos5 1.5 09/06/04 " +#ident "@(#)Defaults.sunos5 1.6 13/11/04 " ########################################################################### # # global definitions for Solaris 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.syllable cdrtools-3.01a26~trusty/DEFAULTS/Defaults.syllable --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.syllable 2009-06-04 21:10:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.syllable 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.syllable 1.2 09/06/04 " +#ident "@(#)Defaults.syllable 1.3 13/11/04 " ########################################################################### # # global definitions for Syllable Systems @@ -28,7 +28,8 @@ ########################################################################### CWARNOPTS= -DEFINCDIRS= $(SRCROOT)/include /ainc +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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.unixware cdrtools-3.01a26~trusty/DEFAULTS/Defaults.unixware --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/Defaults.unixware 2008-12-26 20:51:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/Defaults.unixware 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.unixware 1.3 08/12/26 " +#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= diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/vc9-cygwin-setup cdrtools-3.01a26~trusty/DEFAULTS/vc9-cygwin-setup --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/vc9-cygwin-setup 2009-07-29 12:39:03.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/vc9-cygwin-setup 2011-08-01 18:07:10.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)vc7-setup 1.5 09/05/16 Copyright 2006 J. Schilling +# @(#)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 @@ -19,8 +19,9 @@ # # An English installation # -VSINSTALLDIR=C:\Program Files(x86)\Microsoft Visual Studio 9.0 -VSINS=/cygdrive/c/Program Files(x86)/Microsoft Visual Studio 9.0 +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 @@ -30,10 +31,12 @@ PATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH} export PATH -INCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE} +#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}\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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS/vc9-setup cdrtools-3.01a26~trusty/DEFAULTS/vc9-setup --- cdrtools-3.00~trusty~mc3man1/DEFAULTS/vc9-setup 2009-07-29 12:39:03.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS/vc9-setup 2011-08-01 18:07:10.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)vc7-setup 1.5 09/05/16 Copyright 2006 J. Schilling +# @(#)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 @@ -19,8 +19,9 @@ # # An English installation # -VSINSTALLDIR=C:\Program Files(x86)\Microsoft Visual Studio 9.0 -VSINS=/cygdrive/c/Program Files(x86)/Microsoft Visual Studio 9.0 +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 @@ -30,10 +31,12 @@ PATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH} export PATH -INCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE} +#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}\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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_CSW/Defaults.sunos5 cdrtools-3.01a26~trusty/DEFAULTS_CSW/Defaults.sunos5 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_CSW/Defaults.sunos5 2009-06-06 14:53:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_CSW/Defaults.sunos5 2013-11-04 20:58:19.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.sunos5 1.4 09/06/06 " +#ident "@(#)Defaults.sunos5 1.5 13/11/04 " ########################################################################### # # global definitions for Solaris Systems @@ -39,6 +39,7 @@ 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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_CSW/sparc-cc.defs cdrtools-3.01a26~trusty/DEFAULTS_CSW/sparc-cc.defs --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_CSW/sparc-cc.defs 2007-11-05 16:35:41.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_CSW/sparc-cc.defs 2014-03-27 21:30:58.000000000 +0000 @@ -1,6 +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)%=-xarch=v8) #XARCH_GEN= $(___XARCH_GEN:$(_UNIQ)%=%) diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.aix cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.aix --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.aix 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.aix 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.aix 1.5 09/06/04 " +#ident "@(#)Defaults.aix 1.6 13/11/04 " ########################################################################### # # global definitions for IBM AIX 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.amigaos cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.amigaos --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.amigaos 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.amigaos 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.amigaos 1.5 09/06/04 " +#ident "@(#)Defaults.amigaos 1.6 13/11/04 " ########################################################################### # # global definitions for AmigaOS Systems using CC=gcc @@ -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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.beos cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.beos --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.beos 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.beos 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.beos 1.5 09/06/04 " +#ident "@(#)Defaults.beos 1.6 13/11/04 " ########################################################################### # # global definitions for BeOS 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.bsd-os cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.bsd-os --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.bsd-os 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.bsd-os 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.bsd-os 1.4 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.bsd-os3 cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.bsd-os3 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.bsd-os3 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.bsd-os3 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.bsd-os3 1.4 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.cygwin32_nt cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.cygwin32_nt --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.cygwin32_nt 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.cygwin32_nt 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.cygwin32_nt 1.5 08/12/26 " +#ident "@(#)Defaults.cygwin32_nt 1.6 13/11/04 " ########################################################################### # # 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) diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.cygwin32_wow64 cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.cygwin32_wow64 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.cygwin32_wow64 2009-07-28 21:55:31.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.cygwin32_wow64 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.cygwin32_wow64 1.5 08/12/26 " +#ident "@(#)Defaults.cygwin32_wow64 1.6 13/11/04 " ########################################################################### # # 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) diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.darwin cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.darwin --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.darwin 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.darwin 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.darwin 1.3 08/12/26 " +#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 ########################################################################### diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.dgux cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.dgux --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.dgux 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.dgux 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.dgux 1.5 09/06/04 " +#ident "@(#)Defaults.dgux 1.6 13/11/04 " ########################################################################### # # global definitions for Data General DGUX 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.dgux3 cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.dgux3 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.dgux3 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.dgux3 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.dgux3 1.5 09/06/04 " +#ident "@(#)Defaults.dgux3 1.6 13/11/04 " ########################################################################### # # global definitions for Data General DGUX 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.dgux4 cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.dgux4 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.dgux4 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.dgux4 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.dgux4 1.5 09/06/04 " +#ident "@(#)Defaults.dgux4 1.6 13/11/04 " ########################################################################### # # global definitions for Data General DGUX 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.domainos cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.domainos --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.domainos 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.domainos 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.domainos 1.5 09/06/04 " +#ident "@(#)Defaults.domainos 1.6 13/11/04 " ########################################################################### # # global definitions for Apollo Domain/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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.dragonfly cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.dragonfly --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.dragonfly 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.dragonfly 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.dragonfly 1.5 08/12/26 " +#ident "@(#)Defaults.dragonfly 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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.freebsd cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.freebsd --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.freebsd 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.freebsd 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.freebsd 1.5 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.freemint cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.freemint --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.freemint 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.freemint 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Defaults.freemint 1.3 08/12/26 +#ident @(#)Defaults.freemint 1.4 13/11/04 ########################################################################### # # global definitions for FreeMiNT on ATARI computers @@ -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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.gnu cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.gnu --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.gnu 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.gnu 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.gnu 1.5 09/06/04 " +#ident "@(#)Defaults.gnu 1.6 13/11/04 " ########################################################################### # # global definitions for GNU (hurd) Systems @@ -28,7 +28,8 @@ ########################################################################### #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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.gnu-kfreebsd cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.gnu-kfreebsd --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.gnu-kfreebsd 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.haiku cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.haiku --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.haiku 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.haiku 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.haiku 1.2 09/06/04 " +#ident "@(#)Defaults.haiku 1.3 13/11/04 " ########################################################################### # # global definitions for Haiku 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.hp-ux cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.hp-ux --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.hp-ux 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.hp-ux 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.hp-ux 1.5 09/06/04 " +#ident "@(#)Defaults.hp-ux 1.6 13/11/04 " ########################################################################### # # global definitions for HP/UX 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.interix cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.interix --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.interix 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.interix 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.interix 1.6 09/06/04 " +#ident "@(#)Defaults.interix 1.7 13/11/04 " ########################################################################### # # global definitions for Interix Systems (WIN-NT with SFU) using CC=gcc @@ -39,6 +39,7 @@ #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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.irix cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.irix --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.irix 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.irix 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.irix 1.5 09/06/04 " +#ident "@(#)Defaults.irix 1.6 13/11/04 " ########################################################################### # # global definitions for Silicon Graphics 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.linux cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.linux --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.linux 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.linux 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.linux 1.7 09/06/04 " +#ident "@(#)Defaults.linux 1.8 13/11/04 " ########################################################################### # # global definitions for Linux Systems @@ -40,6 +40,7 @@ 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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.mac-os10 cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.mac-os10 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.mac-os10 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.mac-os10 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.mac-os10 1.3 08/12/26 " +#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 ########################################################################### diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.mingw32_nt cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.mingw32_nt --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.mingw32_nt 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.mingw32_nt 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.mingw32_nt 1.4 08/12/26 " +#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) diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.ms-dos cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.ms-dos --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.ms-dos 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.ms-dos 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.ms-dos 1.5 09/06/04 " +#ident "@(#)Defaults.ms-dos 1.6 13/11/04 " ########################################################################### # # global definitions for MSDOS/DJGPP v2 Systems using CC=gcc @@ -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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.netbsd cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.netbsd --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.netbsd 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.netbsd 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.netbsd 1.4 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.newsos6 cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.newsos6 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.newsos6 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.newsos6 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.newsos6 1.5 09/06/04 " +#ident "@(#)Defaults.newsos6 1.6 13/11/04 " ########################################################################### # # global definitions for Sony NEWS-OS 6.x @@ -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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.nextstep cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.nextstep --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.nextstep 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.nextstep 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.nextstep 1.4 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.openbsd cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.openbsd --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.openbsd 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.openbsd 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.openbsd 1.4 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.openserver cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.openserver --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.openserver 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.openserver 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.openserver 1.3 08/12/26 " +#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= diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.openvms cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.openvms --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.openvms 2009-10-31 20:21:51.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.openvms 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.openvms 1.1 09/10/31 " +#ident "@(#)Defaults.openvms 1.2 13/11/04 " ########################################################################### # # global definitions for OpenVMS @@ -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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.os2 cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.os2 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.os2 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.os2 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.os2 1.5 09/06/04 " +#ident "@(#)Defaults.os2 1.6 13/11/04 " ########################################################################### # # global definitions for OS/2 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.osf1 cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.osf1 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.osf1 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.osf1 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.osf1 1.5 09/06/04 " +#ident "@(#)Defaults.osf1 1.6 13/11/04 " ########################################################################### # # global definitions for Digital UNIX (OSF1) 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.pyro cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.pyro --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.pyro 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.qnx cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.qnx --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.qnx 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.qnx 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.qnx 1.4 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.rhapsody cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.rhapsody --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.rhapsody 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.rhapsody 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.rhapsody 1.3 08/12/26 " +#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 ########################################################################### diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.sunos4 cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.sunos4 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.sunos4 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.sunos4 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.sunos4 1.4 08/12/26 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.sunos5 cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.sunos5 --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.sunos5 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.sunos5 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.sunos5 1.5 09/06/04 " +#ident "@(#)Defaults.sunos5 1.6 13/11/04 " ########################################################################### # # global definitions for Solaris 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) RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.syllable cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.syllable --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.syllable 2009-06-04 21:11:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.syllable 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.syllable 1.2 09/06/04 " +#ident "@(#)Defaults.syllable 1.3 13/11/04 " ########################################################################### # # global definitions for Syllable Systems @@ -28,7 +28,8 @@ ########################################################################### #CWARNOPTS= -DEFINCDIRS= $(SRCROOT)/include /ainc +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 diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.unixware cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.unixware --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/Defaults.unixware 2008-12-26 21:46:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/DEFAULTS_ENG/Defaults.unixware 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.unixware 1.3 08/12/26 " +#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= diff -Nru cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/vc9-cygwin-setup cdrtools-3.01a26~trusty/DEFAULTS_ENG/vc9-cygwin-setup --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/vc9-cygwin-setup 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/DEFAULTS_ENG/vc9-setup cdrtools-3.01a26~trusty/DEFAULTS_ENG/vc9-setup --- cdrtools-3.00~trusty~mc3man1/DEFAULTS_ENG/vc9-setup 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/inc/align_test.c cdrtools-3.01a26~trusty/inc/align_test.c --- cdrtools-3.00~trusty~mc3man1/inc/align_test.c 2009-11-07 19:22:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/inc/align_test.c 2013-04-25 21:07:31.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)align_test.c 1.26 09/11/07 Copyright 1995-2009 J. Schilling */ +/* @(#)align_test.c 1.30 13/04/25 Copyright 1995-2013 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)align_test.c 1.26 09/11/07 Copyright 1995-2009 J. Schilling"; + "@(#)align_test.c 1.30 13/04/25 Copyright 1995-2013 J. Schilling"; #endif /* * Generate machine dependant align.h * - * Copyright (c) 1995-2009 J. Schilling + * Copyright (c) 1995-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -23,8 +23,9 @@ #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 @@ -220,6 +221,8 @@ 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; @@ -327,6 +330,8 @@ 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); } @@ -340,8 +345,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"); @@ -375,7 +380,7 @@ 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"); @@ -683,10 +688,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 */ diff -Nru cdrtools-3.00~trusty~mc3man1/inc/avoffset.c cdrtools-3.01a26~trusty/inc/avoffset.c --- cdrtools-3.00~trusty~mc3man1/inc/avoffset.c 2009-07-10 19:56:32.000000000 +0000 +++ cdrtools-3.01a26~trusty/inc/avoffset.c 2011-11-28 19:28:41.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)avoffset.c 1.30 09/07/10 Copyright 1987, 1995-2009 J. Schilling */ +/* @(#)avoffset.c 1.33 11/11/28 Copyright 1987, 1995-2011 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)avoffset.c 1.30 09/07/10 Copyright 1987, 1995-2009 J. Schilling"; + "@(#)avoffset.c 1.33 11/11/28 Copyright 1987, 1995-2011 J. Schilling"; #endif /* * This program is a tool to generate the file "avoffset.h". @@ -13,7 +13,7 @@ * FP_INDIR - number of stack frames above main() * before encountering a NULL pointer. * - * Copyright (c) 1987, 1995-2009 J. Schilling + * Copyright (c) 1987, 1995-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -46,6 +46,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 +97,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 +108,13 @@ /* * 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) { if (fp->fr_savpc == 0) break; @@ -120,16 +131,29 @@ 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 */ } diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/align.h cdrtools-3.01a26~trusty/include/schily/align.h --- cdrtools-3.00~trusty~mc3man1/include/schily/align.h 2009-06-05 23:07:39.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/align.h 2013-07-23 19:09:22.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)align.h 1.7 09/06/06 Copyright 1995-2009 J. Schilling */ +/* @(#)align.h 1.11 13/07/23 Copyright 1995-2013 J. Schilling */ /* * Platform dependent definitions for aligning data. * - * Copyright (c) 1995-2009 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. @@ -114,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 @@ -125,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-3.00~trusty~mc3man1/include/schily/alloca.h cdrtools-3.01a26~trusty/include/schily/alloca.h --- cdrtools-3.00~trusty~mc3man1/include/schily/alloca.h 2006-09-13 01:35:18.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/archdefs.h cdrtools-3.01a26~trusty/include/schily/archdefs.h --- cdrtools-3.00~trusty~mc3man1/include/schily/archdefs.h 2009-08-09 14:05:22.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/archdefs.h 2013-07-23 19:09:22.000000000 +0000 @@ -1,9 +1,9 @@ -/* @(#)archdefs.h 1.8 09/08/09 Copyright 2006-2009 J. Schilling */ +/* @(#)archdefs.h 1.14 13/07/23 Copyright 2006-2013 J. Schilling */ /* * Processor, instruction set and OS architecture specific defines. * The information is fetched from compiler predefinitions only. * - * Copyright (c) 2006-2009 J. Schilling + * Copyright (c) 2006-2013 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. @@ -49,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 @@ -117,7 +119,10 @@ */ #if defined(__sun) && !defined(__SVR4) +#define __SUNOS4 + #if defined(__mc68000) +#define __SUNOS4_MC68000 #ifdef __GNUC__ #define __SUNOS4_MC68000_GCC32 #define __JS_ARCH_DEFINED @@ -129,6 +134,7 @@ #endif /* __mc68000 */ #if defined(__sparc) +#define __SUNOS4_SPARC #ifdef __GNUC__ #define __SUNOS4_SPARC_GCC32 #define __JS_ARCH_DEFINED @@ -147,6 +153,8 @@ */ #if defined(__sun) && defined(__SVR4) +#define __SUNOS5 + #if defined(__sparc) #ifdef __GNUC__ #ifdef __sparcv9 @@ -214,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-3.00~trusty~mc3man1/include/schily/avoffset.h cdrtools-3.01a26~trusty/include/schily/avoffset.h --- cdrtools-3.00~trusty~mc3man1/include/schily/avoffset.h 2007-12-01 19:16:32.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/avoffset.h 2013-08-26 18:06:47.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)avoffset.h 1.7 07/12/01 Copyright 1995-2007 J. Schilling */ +/* @(#)avoffset.h 1.13 13/08/26 Copyright 1995-2013 J. Schilling */ /* * Platform dependent definitions for stack scanning. * - * Copyright (c) 1995-2007 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-3.00~trusty~mc3man1/include/schily/btorder.h cdrtools-3.01a26~trusty/include/schily/btorder.h --- cdrtools-3.00~trusty~mc3man1/include/schily/btorder.h 2007-01-16 14:19:12.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/ccomdefs.h cdrtools-3.01a26~trusty/include/schily/ccomdefs.h --- cdrtools-3.00~trusty~mc3man1/include/schily/ccomdefs.h 2010-04-26 19:21:40.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/ccomdefs.h 2011-07-21 19:27:19.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)ccomdefs.h 1.9 10/04/26 Copyright 2000-2010 J. Schilling */ +/* @(#)ccomdefs.h 1.12 11/07/21 Copyright 2000-2011 J. Schilling */ /* * Various compiler dependant macros. * - * Copyright (c) 2000-2010 J. Schilling + * Copyright (c) 2000-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -33,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) @@ -60,16 +61,17 @@ #endif /* GNUC */ -#if __GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 1 +#if __GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 2 +/* GCC-3.3 or more */ /* CSTYLED */ #define UConst __attribute__ ((__used__)) const -#else /* GNUC 3.2 */ +#else /* less than GNUC 3.3 */ #define UConst const -#endif /* GNUC 3.2 */ +#endif /* less than GNUC 3.3 */ #ifdef __PCC__ /* diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/checkerr.h cdrtools-3.01a26~trusty/include/schily/checkerr.h --- cdrtools-3.00~trusty~mc3man1/include/schily/checkerr.h 2009-06-05 23:07:39.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/checkerr.h 2012-11-29 19:19:59.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)checkerr.h 1.11 09/06/06 Copyright 2003-2009 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-2009 J. Schilling + * Copyright (c) 2003-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -36,6 +36,10 @@ #include #endif +#ifdef __cplusplus +extern "C" { +#endif + /* * Error conditions handled by error control. */ @@ -54,6 +58,10 @@ #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 */ #define E_SECURITY 0x40000 /* Skipped for security reasons */ @@ -63,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 */ @@ -73,6 +85,11 @@ extern int errconfig __PR((char *name)); 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)); +extern BOOL errabort __PR((int etype, const char *fname, + BOOL doexit)); + +#ifdef __cplusplus +} +#endif #endif /* _SCHILY_CHECKERR_H */ diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/dbgmalloc.h cdrtools-3.01a26~trusty/include/schily/dbgmalloc.h --- cdrtools-3.00~trusty~mc3man1/include/schily/dbgmalloc.h 2009-10-19 19:43:32.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/dbgmalloc.h 2010-09-18 22:14:44.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)dbgmalloc.h 1.3 09/10/19 Copyright 2009 J. Schilling */ +/* @(#)dbgmalloc.h 1.5 10/09/19 Copyright 2010 J. Schilling */ /* * Definitions for libdmalloc * - * Copyright (c) 2009 J. Schilling + * Copyright (c) 2009-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -31,9 +31,12 @@ 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)); +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__) @@ -46,9 +49,16 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + extern BOOL acheckdamage __PR((void)); extern void freechecking __PR((BOOL val)); extern void nomemraising __PR((BOOL val)); +#ifdef __cplusplus +} +#endif #endif /* _SCHILY_DBGMALLOC_H */ diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/deflts.h cdrtools-3.01a26~trusty/include/schily/deflts.h --- cdrtools-3.00~trusty~mc3man1/include/schily/deflts.h 2006-10-10 08:24:14.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/dirent.h cdrtools-3.01a26~trusty/include/schily/dirent.h --- cdrtools-3.00~trusty~mc3man1/include/schily/dirent.h 2009-05-24 11:07:46.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/dirent.h 2011-08-04 18:28:19.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)dirent.h 1.28 09/05/24 Copyright 1987, 1998, 2000-2009 J. Schilling */ +/* @(#)dirent.h 1.29 11/08/04 Copyright 1987, 1998, 2000-2011 J. Schilling */ /* - * Copyright (c) 1987, 1998, 2000-2009 J. Schilling + * Copyright (c) 1987, 1998, 2000-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -62,6 +62,9 @@ # 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 @@ -131,12 +134,26 @@ # 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_ */ @@ -162,10 +179,14 @@ #ifndef _SCHILY_STDIO_H #include #endif - - typedef struct __dirdesc { - FILE *dd_fd; - } DIR; +#if defined(__MINGW32__) || defined(_MSC_VER) +#ifndef _SCHILY_IO_H +#include /* for _findfirst() */ +#endif +#ifndef _SCHILY_UTYPES_H +#include +#endif +#endif struct _direct { unsigned long d_ino; @@ -175,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-3.00~trusty~mc3man1/include/schily/err_arch.h cdrtools-3.01a26~trusty/include/schily/err_arch.h --- cdrtools-3.00~trusty~mc3man1/include/schily/err_arch.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/err_arch.mk cdrtools-3.01a26~trusty/include/schily/err_arch.mk --- cdrtools-3.00~trusty~mc3man1/include/schily/err_arch.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/err_bit.h cdrtools-3.01a26~trusty/include/schily/err_bit.h --- cdrtools-3.00~trusty~mc3man1/include/schily/err_bit.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/err_bit.mk cdrtools-3.01a26~trusty/include/schily/err_bit.mk --- cdrtools-3.00~trusty~mc3man1/include/schily/err_bit.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/err_char.h cdrtools-3.01a26~trusty/include/schily/err_char.h --- cdrtools-3.00~trusty~mc3man1/include/schily/err_char.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/err_char.mk cdrtools-3.01a26~trusty/include/schily/err_char.mk --- cdrtools-3.00~trusty~mc3man1/include/schily/err_char.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/errno.h cdrtools-3.01a26~trusty/include/schily/errno.h --- cdrtools-3.00~trusty~mc3man1/include/schily/errno.h 2006-12-24 23:38:48.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/err_type.h cdrtools-3.01a26~trusty/include/schily/err_type.h --- cdrtools-3.00~trusty~mc3man1/include/schily/err_type.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/err_type.mk cdrtools-3.01a26~trusty/include/schily/err_type.mk --- cdrtools-3.00~trusty~mc3man1/include/schily/err_type.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/fcntl.h cdrtools-3.01a26~trusty/include/schily/fcntl.h --- cdrtools-3.00~trusty~mc3man1/include/schily/fcntl.h 2007-01-16 14:19:12.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/fetchdir.h cdrtools-3.01a26~trusty/include/schily/fetchdir.h --- cdrtools-3.00~trusty~mc3man1/include/schily/fetchdir.h 2008-04-06 13:25:34.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/fetchdir.h 2013-04-24 21:16:20.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)fetchdir.h 1.5 08/04/06 Copyright 2002-2008 J. Schilling */ +/* @(#)fetchdir.h 1.7 13/04/24 Copyright 2002-2013 J. Schilling */ /* - * Copyright (c) 2002-2008 J. Schilling + * Copyright (c) 2002-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -18,15 +18,17 @@ #define _SCHILY_FETCHDIR_H #ifndef _SCHILY_DIRENT_H -#include /* Includes mconfig.h if needed */ +#include /* Includes mconfig.h if needed */ #endif #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 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, diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/find.h cdrtools-3.01a26~trusty/include/schily/find.h --- cdrtools-3.00~trusty~mc3man1/include/schily/find.h 2009-01-13 19:14:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/find.h 2011-08-05 19:28:30.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)find.h 1.20 09/01/13 Copyright 2005-2009 J. Schilling */ +/* @(#)find.h 1.23 11/08/05 Copyright 2005-2011 J. Schilling */ /* * Definitions for libfind users. * - * Copyright (c) 2004-2009 J. Schilling + * Copyright (c) 2004-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -72,6 +72,11 @@ #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 { @@ -95,11 +100,15 @@ 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 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)); +extern int find_main __PR((int ac, char **av, char **ev, + FILE *std[3], squit_t *__quit)); #ifdef __cplusplus } diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/fnmatch.h cdrtools-3.01a26~trusty/include/schily/fnmatch.h --- cdrtools-3.00~trusty~mc3man1/include/schily/fnmatch.h 2010-04-26 19:21:40.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/fnmatch.h 2010-10-09 21:45:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)fnmatch.h 8.11 10/04/26 Copyright 2006-2010 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,11 +6,20 @@ #ifndef _SCHILY_MCONFIG_H #include #endif + #ifdef HAVE_FNMATCH_H #include -#else +#else /* !HAVE_FNMATCH_H */ + +#ifdef __cplusplus +extern "C" { +#endif -int fnmatch __PR((const char *, const char *, int)); +extern int fnmatch __PR((const char *, const char *, int)); + +#ifdef __cplusplus +} +#endif #endif /* !HAVE_FNMATCH */ @@ -42,9 +51,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)fnmatch.h 8.11 (Berkeley) 04/26/10 + * @(#)fnmatch.h 8.13 (Berkeley) 10/09/10 */ +#ifdef __cplusplus +extern "C" { +#endif + #ifndef FNM_NOMATCH #define FNM_NOMATCH 1 /* Match failed. */ #endif @@ -77,9 +90,14 @@ #define FNM_LEADING_DIR 0x20 /* Ignore / after Imatch. */ #endif -#ifndef HAVE_FNMATCH_IGNORECASE -int js_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 /* !_SCHILY_FNMATCH_H */ diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/fstream.h cdrtools-3.01a26~trusty/include/schily/fstream.h --- cdrtools-3.00~trusty~mc3man1/include/schily/fstream.h 2008-01-02 17:08:27.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/fstream.h 2014-04-14 18:51:03.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)fstream.h 1.14 08/01/02 Copyright 1985-2008 J. Schilling */ +/* @(#)fstream.h 1.17 14/04/14 Copyright 1985-2014 J. Schilling */ /* * Definitions for the file stream package * - * Copyright (c) 1985-2008 J. Schilling + * Copyright (c) 1985-2014 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. @@ -35,21 +37,54 @@ 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; -typedef struct fstream { - FILE *fstr_file; - CHAR *fstr_bp; - CHAR *fstr_buf; - int (*fstr_func) __PR((struct fstream *, FILE *)); - int (*fstr_rfunc) __PR((struct 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]; -} fstream; +}; 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)); diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/getargs.h cdrtools-3.01a26~trusty/include/schily/getargs.h --- cdrtools-3.00~trusty~mc3man1/include/schily/getargs.h 2007-07-01 22:32:54.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/getargs.h 2014-01-18 22:20:36.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)getargs.h 1.18 07/07/02 Copyright 1985-2007 J. Schilling */ +/* @(#)getargs.h 1.20 14/01/18 Copyright 1985-2014 J. Schilling */ /* * Definitions for getargs()/getallargs()/getfiles() * - * Copyright (c) 1985-2007 J. Schilling + * Copyright (c) 1985-2014 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. @@ -57,8 +59,31 @@ #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 @@ -107,9 +132,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 +146,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_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 *)); #ifdef __cplusplus } diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/getcwd.h cdrtools-3.01a26~trusty/include/schily/getcwd.h --- cdrtools-3.00~trusty~mc3man1/include/schily/getcwd.h 2008-12-08 19:31:38.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/getcwd.h 2010-08-24 13:40:56.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)getcwd.h 1.5 08/12/08 Copyright 1998-2008 J. Schilling */ +/* @(#)getcwd.h 1.6 10/08/24 Copyright 1998-2010 J. Schilling */ /* * Definitions for getcwd() * - * Copyright (c) 1998-2008 J. Schilling + * Copyright (c) 1998-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -31,6 +31,13 @@ # 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 @@ -39,4 +46,8 @@ # endif #endif +#ifdef __cplusplus +} +#endif + #endif /* _SCHILY_GETCWD_H */ diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/hostname.h cdrtools-3.01a26~trusty/include/schily/hostname.h --- cdrtools-3.00~trusty~mc3man1/include/schily/hostname.h 2009-07-28 19:15:25.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/hostname.h 2014-01-01 17:55:21.000000000 +0000 @@ -1,9 +1,9 @@ -/* @(#)hostname.h 1.18 09/07/28 Copyright 1995-2008 J. Schilling */ +/* @(#)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-2008 J. Schilling + * Copyright (c) 1995-2014 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. @@ -41,8 +43,9 @@ #ifndef HOST_NAME_MAX #if defined(HAVE_NETDB_H) && !defined(HOST_NOT_FOUND) && \ !defined(_INCL_NETDB_H) -#include /* #defines MAXHOSTNAMELEN */ -#define _INCL_NETDB_H +#ifndef _SCHILY_NETDB_H +#include /* #defines MAXHOSTNAMELEN */ +#endif #endif #ifdef MAXHOSTNAMELEN #define HOST_NAME_MAX MAXHOSTNAMELEN @@ -69,13 +72,32 @@ 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 diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/idcache.h cdrtools-3.01a26~trusty/include/schily/idcache.h --- cdrtools-3.00~trusty~mc3man1/include/schily/idcache.h 2008-04-06 17:23:50.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/idcache.h 2010-08-24 13:40:56.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)idcache.h 1.2 08/04/06 Copyright 1993, 1995-2008 J. Schilling */ +/* @(#)idcache.h 1.3 10/08/24 Copyright 1993, 1995-2010 J. Schilling */ /* - * Copyright (c) 1993, 1995-2008 J. Schilling + * Copyright (c) 1993, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -25,6 +25,10 @@ #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)); @@ -32,4 +36,8 @@ 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-3.00~trusty~mc3man1/include/schily/inet.h cdrtools-3.01a26~trusty/include/schily/inet.h --- cdrtools-3.00~trusty~mc3man1/include/schily/inet.h 2009-08-04 18:36:17.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/inet.h 2013-07-08 19:53:03.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)inet.h 1.2 09/08/04 Copyright 2009 J. Schilling */ +/* @(#)inet.h 1.3 13/07/08 Copyright 2009-2013 J. Schilling */ /* * Inet abstraction * - * Copyright (c) 2009 J. Schilling + * Copyright (c) 2009-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. @@ -35,9 +37,8 @@ * but inet_ntaoa() is in */ #ifdef HAVE_NETDB_H -#ifndef _INCL_NETDB_H -#include -#define _INCL_NETDB_H +#ifndef _SCHILY_NETDB_H +#include #endif #endif /* HAVE_NETDB_H */ diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/intcvt.h cdrtools-3.01a26~trusty/include/schily/intcvt.h --- cdrtools-3.00~trusty~mc3man1/include/schily/intcvt.h 2006-09-13 01:27:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/inttypes.h cdrtools-3.01a26~trusty/include/schily/inttypes.h --- cdrtools-3.00~trusty~mc3man1/include/schily/inttypes.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/inttypes.mk cdrtools-3.01a26~trusty/include/schily/inttypes.mk --- cdrtools-3.00~trusty~mc3man1/include/schily/inttypes.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/libport.h cdrtools-3.01a26~trusty/include/schily/libport.h --- cdrtools-3.00~trusty~mc3man1/include/schily/libport.h 2010-05-07 17:19:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/libport.h 2014-05-11 15:46:34.000000000 +0000 @@ -1,6 +1,9 @@ -/* @(#)libport.h 1.23 10/05/07 Copyright 1995-2010 J. Schilling */ +/* @(#)libport.h 1.43 14/05/11 Copyright 1995-2014 J. Schilling */ /* - * Copyright (c) 1995-2010 J. Schilling + * Prototypes for POSIX standard functions that may be missing on the + * local platform and thus are implemented inside libschily. + * + * Copyright (c) 1995-2014 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. @@ -33,7 +38,7 @@ extern "C" { #endif -#if defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_) || 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 @@ -51,7 +56,19 @@ * Don't #undef HAVE_USLEEP in this file, SCO has a * usleep() prototype in unistd.h */ -/*#undef HAVE_USLEEP*/ +/* #undef HAVE_USLEEP */ +#endif + +#ifdef FOUND_SIZE_T +/* + * We currently cannot define this here because there IXIX 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 #ifndef HAVE_GETHOSTID @@ -64,6 +81,16 @@ 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 @@ -90,25 +117,34 @@ 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)); +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)); +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)); +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)); +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)); @@ -117,7 +153,8 @@ 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)); +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)); @@ -136,28 +173,40 @@ 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)); +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)); +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)); +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)); +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)); +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 /* @@ -177,6 +226,181 @@ 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 } #endif diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/librmt.h cdrtools-3.01a26~trusty/include/schily/librmt.h --- cdrtools-3.00~trusty~mc3man1/include/schily/librmt.h 2007-01-16 14:19:12.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/limits.h cdrtools-3.01a26~trusty/include/schily/limits.h --- cdrtools-3.00~trusty~mc3man1/include/schily/limits.h 2010-05-07 18:46:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/limits.h 2011-08-12 22:03:28.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)limits.h 1.4 10/05/07 Copyright 2010 J. Schilling */ +/* @(#)limits.h 1.7 11/08/13 Copyright 2011 J. Schilling */ /* - * Copyright (c) 2010 J. Schilling + * Copyright (c) 2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -36,4 +36,19 @@ #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-3.00~trusty~mc3man1/include/schily/Makefile cdrtools-3.01a26~trusty/include/schily/Makefile --- cdrtools-3.00~trusty~mc3man1/include/schily/Makefile 2009-07-10 19:32:22.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/Makefile 2013-10-27 10:01:02.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile 1.21 09/07/10 +#ident @(#)Makefile 1.22 13/10/27 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -16,3 +16,4 @@ ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### + diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/maxpath.h cdrtools-3.01a26~trusty/include/schily/maxpath.h --- cdrtools-3.00~trusty~mc3man1/include/schily/maxpath.h 2009-02-17 21:58:13.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/maxpath.h 2010-08-27 10:56:18.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)maxpath.h 1.11 09/02/17 Copyright 1985, 1995, 1998, 2001-2009 J. Schilling */ +/* @(#)maxpath.h 1.12 10/08/27 Copyright 1985, 1995, 1998, 2001-2010 J. Schilling */ /* * Definitions for dealing with statically limitations on pathnames * - * Copyright (c) 1985, 1995, 1998, 2001-2009 J. Schilling + * Copyright (c) 1985, 1995, 1998, 2001-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -20,7 +20,7 @@ #define _SCHILY_MAXPATH_H #ifndef _SCHILY_DIRENT_H -#include /* Includes mconfig.h if needed */ +#include /* Includes mconfig.h if needed */ #endif #ifdef JOS diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/mconfig.h cdrtools-3.01a26~trusty/include/schily/mconfig.h --- cdrtools-3.00~trusty~mc3man1/include/schily/mconfig.h 2009-10-17 18:52:18.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/mconfig.h 2014-01-03 11:36:56.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)mconfig.h 1.66 09/10/17 Copyright 1995-2009 J. Schilling */ +/* @(#)mconfig.h 1.69 14/01/03 Copyright 1995-2014 J. Schilling */ /* * definitions for machine configuration * - * Copyright (c) 1995-2009 J. Schilling + * Copyright (c) 1995-2014 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. @@ -78,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 @@ -108,7 +111,7 @@ #endif #endif -/*--------------------------------------------------------------------------*/ +/* ------------------------------------------------------------------------- */ /* * Some magic that cannot (yet) be figured out with autoconf. */ @@ -275,7 +278,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 @@ -307,7 +311,7 @@ #endif /* __OPRINTF__ */ -/*--------------------------------------------------------------------------*/ +/* ------------------------------------------------------------------------- */ #ifndef _SCHILY_PROTOTYP_H #include @@ -336,8 +340,8 @@ * #endif * * 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. + * 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) @@ -515,6 +519,21 @@ # 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 diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/md4.h cdrtools-3.01a26~trusty/include/schily/md4.h --- cdrtools-3.00~trusty~mc3man1/include/schily/md4.h 2009-08-08 20:31:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/md4.h 2010-08-27 11:00:43.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)md4.h 1.3 09/08/08 2009 J. Schilling */ +/* @(#)md4.h 1.4 10/08/27 2009-2010 J. Schilling */ /* * MD4 hash code taken from OpenBSD * - * Portions Copyright (c) 2009 J. Schilling + * Portions Copyright (c) 2009-2010 J. Schilling */ /* $OpenBSD: md4.h,v 1.15 2004/06/22 01:57:30 jfb Exp $ */ @@ -45,7 +45,8 @@ 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 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)); diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/md5.h cdrtools-3.01a26~trusty/include/schily/md5.h --- cdrtools-3.00~trusty~mc3man1/include/schily/md5.h 2009-08-08 20:31:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/md5.h 2010-08-27 11:01:44.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)md5.h 1.10 09/08/08 2008-2009 J. Schilling */ +/* @(#)md5.h 1.11 10/08/27 2008-2010 J. Schilling */ /* * MD5 hash code taken from OpenBSD * - * Portions Copyright (c) 2008-2009 J. Schilling + * Portions Copyright (c) 2008-2010 J. Schilling */ /* $OpenBSD: md5.h,v 1.16 2004/06/22 01:57:30 jfb Exp $ */ @@ -45,7 +45,8 @@ 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 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)); diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/mtio.h cdrtools-3.01a26~trusty/include/schily/mtio.h --- cdrtools-3.00~trusty~mc3man1/include/schily/mtio.h 2006-09-13 00:44:11.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/nlsdefs.h cdrtools-3.01a26~trusty/include/schily/nlsdefs.h --- cdrtools-3.00~trusty~mc3man1/include/schily/nlsdefs.h 2009-05-23 14:29:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/nlsdefs.h 2010-12-19 12:43:18.000000000 +0000 @@ -1,6 +1,8 @@ -/* @(#)nlsdefs.h 1.3 09/05/23 Copyright 2004-2009 J. Schilling */ +/* @(#)nlsdefs.h 1.5 10/12/19 Copyright 2004-2010 J. Schilling */ /* - * Copyright (c) 2004-2009 J. Schilling + * Native language support + * + * Copyright (c) 2004-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -21,6 +23,12 @@ #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() */ @@ -54,6 +62,9 @@ #undef USE_NLS #endif +#ifdef NO_TEXT_DOMAIN +#undef TEXT_DOMAIN +#endif #ifndef USE_NLS #undef gettext @@ -71,4 +82,22 @@ #define bind_textdomain_codeset(d, c) ((char *)0) #endif +#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-3.00~trusty~mc3man1/include/schily/param.h cdrtools-3.01a26~trusty/include/schily/param.h --- cdrtools-3.00~trusty~mc3man1/include/schily/param.h 2009-07-13 23:15:43.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/param.h 2012-01-22 14:27:08.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)param.h 1.5 09/07/14 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,6 +29,12 @@ #ifndef _SCHILY_TYPES_H #include #endif +#ifdef HAVE_SYS_PARAM_H +#ifndef _INCL_SYS_PARAM_H +#include /* Must be before limits.h */ +#define _INCL_SYS_PARAM_H +#endif +#endif #ifndef _SCHILY_LIMITS_H #include /* For _SC_CLK_TCK */ #endif @@ -36,13 +42,6 @@ #include /* For _SC_CLK_TCK */ #endif -#ifdef HAVE_SYS_PARAM_H -#ifndef _INCL_SYS_PARAM_H -#include -#define _INCL_SYS_PARAM_H -#endif -#endif - #ifndef NBBY #define NBBY 8 /* Number of bits per byte */ #endif @@ -66,4 +65,12 @@ #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-3.00~trusty~mc3man1/include/schily/patmatch.h cdrtools-3.01a26~trusty/include/schily/patmatch.h --- cdrtools-3.00~trusty~mc3man1/include/schily/patmatch.h 2009-05-30 19:49:41.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/patmatch.h 2010-08-27 10:35:23.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)patmatch.h 1.13 09/05/30 Copyright 1985,1993-2009 J. Schilling */ +/* @(#)patmatch.h 1.15 10/08/27 Copyright 1985,1993-2010 J. Schilling */ #ifndef _SCHILY_PATMATCH_H #define _SCHILY_PATMATCH_H /* * Definitions for the pattern matching functions. * - * Copyright (c) 1985,1993-2009 J. Schilling + * Copyright (c) 1985,1993-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -76,19 +76,28 @@ #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 @@ -101,12 +110,15 @@ 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, +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, +extern wchar_t *patwlmatch __PR((const wchar_t *__pat, const int *__aux, + const wchar_t *__str, + int __soff, int __slen, int __alt, int __state[])); diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/poll.h cdrtools-3.01a26~trusty/include/schily/poll.h --- cdrtools-3.00~trusty~mc3man1/include/schily/poll.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/poll.mk cdrtools-3.01a26~trusty/include/schily/poll.mk --- cdrtools-3.00~trusty~mc3man1/include/schily/poll.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/priv.h cdrtools-3.01a26~trusty/include/schily/priv.h --- cdrtools-3.00~trusty~mc3man1/include/schily/priv.h 2009-08-24 12:32:46.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/priv.h 2013-05-28 18:02:47.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)priv.h 1.2 09/08/24 Copyright 2009 J. Schilling */ +/* @(#)priv.h 1.5 13/05/28 Copyright 2009-2013 J. Schilling */ /* * Abstraction code for fine grained process privileges * - * Copyright (c) 2009 J. Schilling + * Copyright (c) 2009-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -31,7 +31,13 @@ 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 @@ -47,11 +53,99 @@ 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-3.00~trusty~mc3man1/include/schily/prototyp.h cdrtools-3.01a26~trusty/include/schily/prototyp.h --- cdrtools-3.00~trusty~mc3man1/include/schily/prototyp.h 2009-06-23 17:24:07.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/prototyp.h 2013-10-22 21:08:39.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)prototyp.h 1.14 09/06/23 Copyright 1995-2009 J. Schilling */ +/* @(#)prototyp.h 1.16 13/10/22 Copyright 1995-2013 J. Schilling */ /* * Definitions for dealing with ANSI / KR C-Compilers * - * Copyright (c) 1995-2009 J. Schilling + * Copyright (c) 1995-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,24 +11,40 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/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 /* * If this has already been defined, @@ -102,4 +118,9 @@ # endif #endif +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_PROTOTYP_X_H */ #endif /* _SCHILY_PROTOTYP_H */ diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/_regex.h cdrtools-3.01a26~trusty/include/schily/_regex.h --- cdrtools-3.00~trusty~mc3man1/include/schily/_regex.h 2010-05-08 12:20:41.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/_regex.h 2010-08-27 10:43:55.000000000 +0000 @@ -1,10 +1,10 @@ -/* @(#)_regex.h 1.2 10/05/08 2010 J. Schilling */ +/* @(#)_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. @@ -51,6 +51,10 @@ #include #endif +#ifdef __cplusplus +extern "C" { +#endif + #define __restrict /* types */ @@ -108,17 +112,24 @@ #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)); +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 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-3.00~trusty~mc3man1/include/schily/resource.h cdrtools-3.01a26~trusty/include/schily/resource.h --- cdrtools-3.00~trusty~mc3man1/include/schily/resource.h 2009-08-03 21:46:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/resource.h 2013-04-29 22:27:00.000000000 +0000 @@ -1,10 +1,10 @@ -/* @(#)resource.h 1.7 09/08/03 Copyright 1995-2009 J. Schilling */ +/* @(#)resource.h 1.9 13/04/30 Copyright 1995-2013 J. Schilling */ /* * Abstraction from resource limits * * Missing parts for wait3() taken from SunOS * - * Copyright (c) 1995-2009 J. Schilling + * Copyright (c) 1995-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -33,7 +33,14 @@ * 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 /* @@ -98,4 +105,8 @@ #endif /* RLIMIT_CPU */ +#ifdef __cplusplus +} +#endif + #endif /* _SCHILY_RESOURCE_H */ diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/rmd160.h cdrtools-3.01a26~trusty/include/schily/rmd160.h --- cdrtools-3.00~trusty~mc3man1/include/schily/rmd160.h 2009-08-08 21:28:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/rmd160.h 2010-08-27 11:02:40.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)rmd160.h 1.3 09/08/08 2009 J. Schilling */ +/* @(#)rmd160.h 1.5 10/08/27 2009-2010 J. Schilling */ /* * RMD160 hash code taken from OpenBSD * - * Portions Copyright (c) 2009 J. Schilling + * Portions Copyright (c) 2009-2010 J. Schilling */ /* $OpenBSD: rmd160.h,v 1.16 2004/06/22 01:57:30 jfb Exp $ */ /* @@ -36,6 +36,10 @@ #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) @@ -47,15 +51,13 @@ UInt8_t buffer[RMD160_BLOCK_LENGTH]; /* input buffer */ } RMD160_CTX; -#ifdef __cplusplus -extern "C" { -#endif - extern void RMD160Init __PR((RMD160_CTX *)); -extern void RMD160Transform __PR((UInt32_t [5], const UInt8_t [RMD160_BLOCK_LENGTH])); +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 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)); @@ -65,4 +67,4 @@ } #endif -#endif /* _SCHILY_RMD160_H */ +#endif /* _SCHILY_RMD160_H */ diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/rmtio.h cdrtools-3.01a26~trusty/include/schily/rmtio.h --- cdrtools-3.00~trusty~mc3man1/include/schily/rmtio.h 2006-09-13 01:27:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/schily.h cdrtools-3.01a26~trusty/include/schily/schily.h --- cdrtools-3.00~trusty~mc3man1/include/schily/schily.h 2009-10-22 21:18:55.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/schily.h 2014-01-02 14:49:06.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)schily.h 1.86 09/10/22 Copyright 1985-2009 J. Schilling */ +/* @(#)schily.h 1.113 14/01/02 Copyright 1985-2014 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-2009 J. Schilling + * Copyright (c) 1985-2014 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. @@ -50,12 +52,12 @@ extern "C" { #endif -#if defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_) || 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(_INCL_TYPES_) || 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 @@ -129,33 +131,17 @@ #if defined(RENAME_FEXEC) || defined(RENAME_FSPAWN) #ifndef _SCHILY_UNISTD_H -#include /* Need to include before fexec*() protoypes */ +#include /* Need to incl. before fexec*() protoypes */ #endif #endif #if defined(RENAME_GETLINE) #ifndef _SCHILY_STDIO_H -#include /* Need to include before *getline() protoypes */ +#include /* Need to incl. before *getline() protoypes */ #endif #endif -#ifdef RENAME_FEXEC -#define fexecl js_fexecl -#define fexecle js_fexecle -#define fexecv js_fexecv -#define fexecve js_fexecve -#endif -#ifdef RENAME_FSPAWN -#define fspawnv js_fspawnv -#define fspawnv_nowait js_fspawnv_nowait -#define fspawnl js_fspawnl -#endif -#ifdef RENAME_GETLINE -#define getline js_getline -#define fgetline js_fgetline -#endif - #ifdef EOF /* stdio.h has been included */ extern int _cvmod __PR((const char *, int *, int *)); @@ -167,20 +153,24 @@ */ extern int fdown __PR((FILE *)); #endif -extern int fexecl __PR((const char *, FILE *, FILE *, FILE *, +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 *, ...)); -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)); @@ -211,7 +201,9 @@ #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)); @@ -228,6 +220,54 @@ #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; @@ -243,10 +283,22 @@ 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 +#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 /* @@ -256,9 +308,11 @@ #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 @@ -273,32 +327,52 @@ /*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 +#define COMERR_RETURN 0 +#define COMERR_EXIT 1 +#define COMERR_EXCODE 2 /*PRINTFLIKE4*/ -extern int _comerr __PR((FILE *, int, int, const char *, va_list)); +extern int _comerr __PR((FILE *, int, int, int, + const char *, va_list)); #endif #endif @@ -306,12 +380,14 @@ extern int error __PR((const char *, ...)) __printflike__(1, 2); #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)); +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 *, ...)); @@ -327,16 +403,17 @@ 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);*/ +#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)); #endif @@ -345,27 +422,32 @@ 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 +#define SIP_PLAIN_FILE 0x01 +#define SIP_NO_PATH 0x10 +#define SIP_TYPE_MASK 0x0F + #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); +extern int sprintf __PR((char *, const char *, ...)); #endif -#endif -/*extern int sprintf __PR((char *, const char *, ...)); ist woanders falsch deklariert !!!*/ extern char *strcatl __PR((char *, ...)); extern int streql __PR((const char *, const char *)); #ifdef _SCHILY_WCHAR_H @@ -373,26 +455,36 @@ 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, long), long, const char *, + va_list)); +extern int fprformat __PR((long, const char *, va_list)); #else extern int format __PR((void (*)(char, long), long, const char *, void *)); +extern int fprformat __PR((long, 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 #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); #ifdef FOUND_SIZE_T extern void swabbytes __PR((void *, ssize_t)); @@ -404,6 +496,7 @@ extern int flush_reg_windows __PR((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 @@ -431,6 +524,7 @@ #endif #endif +#ifndef NO_SCHILY_PRINT /* Define to disable *printf() redirects */ #ifdef SCHILY_PRINT #undef fprintf #define fprintf js_fprintf @@ -446,7 +540,34 @@ #define snprintf js_snprintf #endif #endif +#endif + +#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 #ifdef FOUND_SIZE_T extern void *js_malloc __PR((size_t size, char *msg)); @@ -457,21 +578,26 @@ #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 */ #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)); #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 */ diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/sha1.h cdrtools-3.01a26~trusty/include/schily/sha1.h --- cdrtools-3.00~trusty~mc3man1/include/schily/sha1.h 2009-08-01 18:27:03.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/sha1.h 2010-08-27 11:03:30.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)sha1.h 1.2 09/08/01 2009 J. Schilling */ +/* @(#)sha1.h 1.4 10/08/27 2010 J. Schilling */ /* * SHA1 hash code taken from OpenBSD * - * Portions Copyright (c) 2009 J. Schilling + * Portions Copyright (c) 2010 J. Schilling */ /* $OpenBSD: sha1.h,v 1.23 2004/06/22 01:57:30 jfb Exp $ */ @@ -39,13 +39,15 @@ 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 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 *)); +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 } diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/sha2.h cdrtools-3.01a26~trusty/include/schily/sha2.h --- cdrtools-3.00~trusty~mc3man1/include/schily/sha2.h 2009-08-09 12:29:59.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/sha2.h 2010-08-27 10:41:30.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)sha2.h 1.3 09/08/09 2009 J. Schilling */ +/* @(#)sha2.h 1.5 10/08/27 2009-2010 J. Schilling */ /* * SHA2 hash code taken from OpenBSD * - * Portions Copyright (c) 2009 J. Schilling + * Portions Copyright (c) 2009-2010 J. Schilling */ /* $OpenBSD: sha2.h,v 1.7 2008/09/06 12:00:19 djm Exp $ */ @@ -50,7 +50,7 @@ #include -/*** SHA-256/384/512 Various Length Definitions ***********************/ +/* ** 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) @@ -67,7 +67,7 @@ #endif -/*** SHA-256/384/512 Context Structure *******************************/ +/* ** SHA-256/384/512 Context Structure ****************************** */ typedef struct _SHA2_CTX { union { UInt32_t st32[8]; @@ -91,10 +91,12 @@ #endif extern void SHA256Init __PR((SHA2_CTX *)); -extern void SHA256Transform __PR((UInt32_t state[8], const UInt8_t [SHA256_BLOCK_LENGTH])); +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 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)); @@ -102,20 +104,24 @@ #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 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 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 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 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)); diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/shcall.h cdrtools-3.01a26~trusty/include/schily/shcall.h --- cdrtools-3.00~trusty~mc3man1/include/schily/shcall.h 2009-05-02 12:03:39.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/shcall.h 2010-08-27 11:15:53.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)shcall.h 1.2 09/05/02 Copyright 2009 J. Schilling */ +/* @(#)shcall.h 1.3 10/08/27 Copyright 2009-2010 J. Schilling */ /* * Abstraction from shcall.h * - * Copyright (c) 2009 J. Schilling + * Copyright (c) 2009-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -42,7 +42,8 @@ #define __squit_t_defined #endif -typedef int (*shcall) __PR((int ac, char **av, char **ev, FILE *std[3], squit_t *__quit)); +typedef int (*shcall) __PR((int ac, char **av, char **ev, + FILE *std[3], squit_t *__quit)); #ifdef __cplusplus } diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/shedit.h cdrtools-3.01a26~trusty/include/schily/shedit.h --- cdrtools-3.00~trusty~mc3man1/include/schily/shedit.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/shedit.h 2013-09-25 21:34:03.000000000 +0000 @@ -0,0 +1,69 @@ +/* @(#)shedit.h 1.5 13/09/25 Copyright 2006-2013 J. Schilling */ +/* + * Definitions for libshedit, the history editor for the shell. + * + * 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. + */ + +#ifndef _SCHILY_SHEDIT_H +#define _SCHILY_SHEDIT_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#ifndef _SCHILY_TYPES_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_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 + */ +extern int shedit_egetc __PR((void)); +extern int shedit_getdelim __PR((void)); +extern void shedit_treset __PR((void)); +extern void shedit_bhist __PR((void)); +extern void shedit_bshist __PR((int **intrpp)); +extern void shedit_chghistory __PR((char *__val)); +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_setprompts __PR((int promptidx, int nprompts, + char *newprompts[])); + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_SHEDIT_H */ diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/shedit.mk cdrtools-3.01a26~trusty/include/schily/shedit.mk --- cdrtools-3.00~trusty~mc3man1/include/schily/shedit.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/siconv.h cdrtools-3.01a26~trusty/include/schily/siconv.h --- cdrtools-3.00~trusty~mc3man1/include/schily/siconv.h 2010-05-11 20:10:17.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/siconv.h 2010-12-19 23:18:33.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)siconv.h 1.4 10/05/11 Copyright 2007-2010 J. Schilling */ +/* @(#)siconv.h 1.5 10/12/20 Copyright 2007-2010 J. Schilling */ /* * Definitions fur users of libsiconv * @@ -53,6 +53,7 @@ extern int sic_list __PR((FILE *)); extern siconvt_t *sic_open __PR((char *)); +extern const char *sic_base __PR((void)); extern int sic_close __PR((siconvt_t *)); #ifdef __cplusplus diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/sigset.h cdrtools-3.01a26~trusty/include/schily/sigset.h --- cdrtools-3.00~trusty~mc3man1/include/schily/sigset.h 2009-06-30 18:26:14.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/sigset.h 2011-09-16 21:23:33.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)sigset.h 1.9 09/06/30 Copyright 1997-2009 J. Schilling */ +/* @(#)sigset.h 1.11 11/09/16 Copyright 1997-2011 J. Schilling */ /* * Signal set abstraction for BSD/SVR4 signals * - * Copyright (c) 1997-2009 J. Schilling + * Copyright (c) 1997-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -32,12 +32,25 @@ #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; \ \ @@ -48,10 +61,26 @@ #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; \ \ @@ -60,7 +89,15 @@ __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-3.00~trusty~mc3man1/include/schily/socket.h cdrtools-3.01a26~trusty/include/schily/socket.h --- cdrtools-3.00~trusty~mc3man1/include/schily/socket.h 2009-07-13 18:04:37.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/socket.h 2012-11-14 18:59:10.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)socket.h 1.1 09/07/13 Copyright 2009 J. Schilling */ +/* @(#)socket.h 1.3 12/11/14 Copyright 2009-2012 J. Schilling */ /* * Socket abstraction * - * Copyright (c) 2009 J. Schilling + * Copyright (c) 2009-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -24,10 +24,41 @@ #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-3.00~trusty~mc3man1/include/schily/standard.h cdrtools-3.01a26~trusty/include/schily/standard.h --- cdrtools-3.00~trusty~mc3man1/include/schily/standard.h 2009-10-22 21:18:55.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/standard.h 2013-05-01 10:49:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)standard.h 1.37 09/10/22 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(_INCL_TYPES_) || 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(_INCL_TYPES_) || 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-3.00~trusty~mc3man1/include/schily/stat.h cdrtools-3.01a26~trusty/include/schily/stat.h --- cdrtools-3.00~trusty~mc3man1/include/schily/stat.h 2009-12-31 15:14:10.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/stat.h 2013-03-18 23:52:10.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)stat.h 1.14 09/12/31 Copyright 1998-2007 J. Schilling */ +/* @(#)stat.h 1.18 13/03/19 Copyright 1998-2013 J. Schilling */ /* * Definitions for stat() file mode * - * Copyright (c) 1998-2007 J. Schilling + * Copyright (c) 1998-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -180,14 +180,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 +198,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 +211,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,46 +284,81 @@ */ #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_ATIME_N) +/* + * 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_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 @@ -338,10 +368,17 @@ */ #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 @@ -350,6 +387,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-3.00~trusty~mc3man1/include/schily/stdarg.h cdrtools-3.01a26~trusty/include/schily/stdarg.h --- cdrtools-3.00~trusty~mc3man1/include/schily/stdarg.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/stdarg.mk cdrtools-3.01a26~trusty/include/schily/stdarg.mk --- cdrtools-3.00~trusty~mc3man1/include/schily/stdarg.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/stdint.h cdrtools-3.01a26~trusty/include/schily/stdint.h --- cdrtools-3.00~trusty~mc3man1/include/schily/stdint.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/stdint.h 2012-12-03 22:50:40.000000000 +0000 @@ -0,0 +1,485 @@ +/* @(#)stdint.h 1.36 12/12/03 Copyright 1997-2012 J. Schilling */ +/* + * Abstraction from stdint.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_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 -(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 + +/* + * 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-3.00~trusty~mc3man1/include/schily/stdint.mk cdrtools-3.01a26~trusty/include/schily/stdint.mk --- cdrtools-3.00~trusty~mc3man1/include/schily/stdint.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/stdio.h cdrtools-3.01a26~trusty/include/schily/stdio.h --- cdrtools-3.00~trusty~mc3man1/include/schily/stdio.h 2009-04-08 18:23:58.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/stdio.h 2014-01-02 12:56:45.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)stdio.h 1.2 09/04/08 Copyright 2009 J. Schilling */ +/* @(#)stdio.h 1.9 14/01/02 Copyright 2009-2014 J. Schilling */ /* * Abstraction from stdio.h * - * Copyright (c) 2009 J. Schilling + * Copyright (c) 2009-2014 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,6 +20,8 @@ #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 @@ -54,4 +58,50 @@ #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) + +/* + * 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 __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 __flsbuf __PR((int, FILE *)); + +#endif /* defined(__SVR4) && defined(__sun) && defined(_LP64) */ +#endif /* FAST_GETC_PUTC */ + +#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-3.00~trusty~mc3man1/include/schily/stdlib.h cdrtools-3.01a26~trusty/include/schily/stdlib.h --- cdrtools-3.00~trusty~mc3man1/include/schily/stdlib.h 2006-09-13 00:44:11.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/stdlib.h 2011-07-27 18:02:46.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)stdlib.h 1.7 06/09/13 Copyright 1996 J. Schilling */ +/* @(#)stdlib.h 1.9 11/07/27 Copyright 1996-2011 J. Schilling */ /* * Definitions for stdlib * - * Copyright (c) 1996 J. Schilling + * Copyright (c) 1996-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -28,13 +28,22 @@ #include #define _INCL_STDLIB_H #endif -#else + +#else /* !HAVE_STDLIB_H */ + +#ifdef __cplusplus +extern "C" { +#endif extern char *malloc(); extern char *realloc(); extern double atof(); +#ifdef __cplusplus +} +#endif + #endif /* HAVE_STDLIB_H */ #ifndef EXIT_FAILURE diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/stkframe.h cdrtools-3.01a26~trusty/include/schily/stkframe.h --- cdrtools-3.00~trusty~mc3man1/include/schily/stkframe.h 2009-01-06 20:10:53.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/stkframe.h 2010-08-27 11:18:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)stkframe.h 1.12 09/01/06 Copyright 1995-2009 J. Schilling */ +/* @(#)stkframe.h 1.13 10/08/27 Copyright 1995-2010 J. Schilling */ /* * Common definitions for routines that parse the stack frame. * @@ -85,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-3.00~trusty~mc3man1/include/schily/string.h cdrtools-3.01a26~trusty/include/schily/string.h --- cdrtools-3.00~trusty~mc3man1/include/schily/string.h 2006-10-10 08:24:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/sunos4_proto.h cdrtools-3.01a26~trusty/include/schily/sunos4_proto.h --- cdrtools-3.00~trusty~mc3man1/include/schily/sunos4_proto.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/sunos4_proto.mk cdrtools-3.01a26~trusty/include/schily/sunos4_proto.mk --- cdrtools-3.00~trusty~mc3man1/include/schily/sunos4_proto.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/Targets cdrtools-3.01a26~trusty/include/schily/Targets --- cdrtools-3.00~trusty~mc3man1/include/schily/Targets 2010-05-08 12:11:23.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/Targets 2013-09-24 12:19:26.000000000 +0000 @@ -1,33 +1,36 @@ -#ident @(#)Targets 1.14 10/05/07 +#ident @(#)Targets 1.22 13/09/19 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 \ + 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 priv.mk procfs.mk prototyp.mk pwd.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 shm.mk \ + schily.mk schilyp.mk select.mk sem.mk shedit.mk shm.mk \ setjmp.mk sha1.mk sha2.mk shcall.mk \ siconv.mk shadow.mk \ sigblk.mk signal.mk sigset.mk socket.mk standard.mk stat.mk \ - stdio.mk \ + stdarg.mk stdint.mk stdio.mk \ stdlib.mk stkframe.mk string.mk \ + sunos4_proto.mk \ sysexits.mk syslog.mk systeminfo.mk \ - termcap.mk termios.mk time.mk times.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-3.00~trusty~mc3man1/include/schily/termcap.h cdrtools-3.01a26~trusty/include/schily/termcap.h --- cdrtools-3.00~trusty~mc3man1/include/schily/termcap.h 2006-10-10 07:27:57.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/termios.h cdrtools-3.01a26~trusty/include/schily/termios.h --- cdrtools-3.00~trusty~mc3man1/include/schily/termios.h 2009-07-21 19:36:04.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/termios.h 2011-08-12 22:04:06.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)termios.h 1.32 09/07/21 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 @@ -36,8 +36,10 @@ # 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 @@ -48,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 @@ -63,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-3.00~trusty~mc3man1/include/schily/timeb.h cdrtools-3.01a26~trusty/include/schily/timeb.h --- cdrtools-3.00~trusty~mc3man1/include/schily/timeb.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/timeb.mk cdrtools-3.01a26~trusty/include/schily/timeb.mk --- cdrtools-3.00~trusty~mc3man1/include/schily/timeb.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/time.h cdrtools-3.01a26~trusty/include/schily/time.h --- cdrtools-3.00~trusty~mc3man1/include/schily/time.h 2007-04-25 14:54:03.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/unistd.h cdrtools-3.01a26~trusty/include/schily/unistd.h --- cdrtools-3.00~trusty~mc3man1/include/schily/unistd.h 2009-07-26 23:37:43.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/unistd.h 2014-06-19 21:05:26.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)unistd.h 1.21 09/07/27 Copyright 1996-2009 J. Schilling */ +/* @(#)unistd.h 1.27 14/06/19 Copyright 1996-2014 J. Schilling */ /* * Definitions for unix system interface * - * Copyright (c) 1996-2009 J. Schilling + * Copyright (c) 1996-2014 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 @@ -119,16 +128,31 @@ extern char **environ; #endif +#ifdef __cplusplus +extern "C" { +#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 @@ -136,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-3.00~trusty~mc3man1/include/schily/utime.h cdrtools-3.01a26~trusty/include/schily/utime.h --- cdrtools-3.00~trusty~mc3man1/include/schily/utime.h 2007-01-16 14:19:13.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/utsname.h cdrtools-3.01a26~trusty/include/schily/utsname.h --- cdrtools-3.00~trusty~mc3man1/include/schily/utsname.h 2009-07-13 18:04:37.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/utsname.h 2011-08-05 18:06:53.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)utsname.h 1.1 09/07/13 Copyright 2009 J. Schilling */ +/* @(#)utsname.h 1.3 11/08/05 Copyright 2009-2011 J. Schilling */ /* * Utsname abstraction * - * Copyright (c) 2009 J. Schilling + * Copyright (c) 2009-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -31,6 +31,32 @@ #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-3.00~trusty~mc3man1/include/schily/utypes.h cdrtools-3.01a26~trusty/include/schily/utypes.h --- cdrtools-3.00~trusty~mc3man1/include/schily/utypes.h 2009-11-05 21:40:54.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/utypes.h 2013-09-14 15:48:14.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)utypes.h 1.29 09/11/05 Copyright 1997-2009 J. Schilling */ +/* @(#)utypes.h 1.36 13/09/14 Copyright 1997-2013 J. Schilling */ /* * Definitions for some user defined types * - * Copyright (c) 1997-2009 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,86 +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 - */ -#ifndef _SCHILY_LIMITS_H -#include -#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 /* @@ -115,67 +45,6 @@ typedef unsigned char Uchar; /* - * 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 - -/* * 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. @@ -191,215 +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 . - */ - -#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 -/* - * 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 - -#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 -#if SIZEOF_CHAR_P == SIZEOF_LLONG - typedef Llong Intptr_t; -#else - error No intptr_t found -#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 -#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 -#if SIZEOF_CHAR_P == SIZEOF_ULLONG - typedef ULlong UIntptr_t; -#else - error No uintptr_t found -#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 */ - -#endif /* HAVE_INTTYPES_H */ - #ifndef CHAR_MIN #define CHAR_MIN TYPE_MINVAL(char) #endif @@ -440,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) @@ -554,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-3.00~trusty~mc3man1/include/schily/varargs.h cdrtools-3.01a26~trusty/include/schily/varargs.h --- cdrtools-3.00~trusty~mc3man1/include/schily/varargs.h 2006-09-13 00:44:11.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/wait.h cdrtools-3.01a26~trusty/include/schily/wait.h --- cdrtools-3.00~trusty~mc3man1/include/schily/wait.h 2009-11-15 22:59:23.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/wait.h 2011-07-19 18:06:06.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)wait.h 1.17 09/11/15 Copyright 1995-2007 J. Schilling */ +/* @(#)wait.h 1.19 11/07/19 Copyright 1995-2011 J. Schilling */ /* * Definitions to deal with various kinds of wait flavour * - * Copyright (c) 1995-2007 J. Schilling + * Copyright (c) 1995-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -72,6 +72,49 @@ extern "C" { #endif +#ifndef WCOREFLG +#define WCOREFLG 0x80 +#define NO_WCOREFLG +#endif + +#ifndef WSTOPFLG +#define WSTOPFLG 0x7F +#define NO_WSTOPFLG +#endif + +#ifndef WCONTFLG +#define WCONTFLG 0xFFFF +#define NO_WCONTFLG +#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 +#define WSTOPPED 0 +#define NO_WSTOPPED +#endif +#ifndef WTRAPPED +#define WTRAPPED 0 +#define NO_WTRAPPED +#endif + #if defined(HAVE_UNION_WAIT) && defined(USE_UNION_WAIT) # define WAIT_T union wait # define _W_U(w) ((union wait *)&(w)) @@ -90,6 +133,9 @@ # ifndef WSTOPSIG # define WSTOPSIG(status) (_W_U(status)->w_stopsig) # endif +# ifndef WIFCONTINUED +# define WIFCONTINUED(status) (0) +# endif # ifndef WIFSTOPPED # define WIFSTOPPED(status) (_W_U(status)->w_stopval == \ WSTOPPED) @@ -119,6 +165,18 @@ # ifndef WSTOPSIG # 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) ((_W_I(status) & 0xFF) == 0x7F) # endif @@ -132,18 +190,6 @@ #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-3.00~trusty~mc3man1/include/schily/walk.h cdrtools-3.01a26~trusty/include/schily/walk.h --- cdrtools-3.00~trusty~mc3man1/include/schily/walk.h 2009-06-05 23:07:39.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/walk.h 2011-08-03 21:17:03.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)walk.h 1.26 09/06/06 Copyright 2004-2009 J. Schilling */ +/* @(#)walk.h 1.30 11/08/03 Copyright 2004-2011 J. Schilling */ /* * Definitions for directory tree walking * - * Copyright (c) 2004-2009 J. Schilling + * Copyright (c) 2004-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -64,6 +64,7 @@ #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. @@ -74,7 +75,7 @@ #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 */ +#define WALK_SLN 7 /* Symbolic Link points to nonexistent file */ #ifndef __sqfun_t_defined typedef int (*sqfun_t) __PR((void *arg)); @@ -105,15 +106,17 @@ /* * 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("..") */ +#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("..") */ -typedef int (*walkfun) __PR((char *_nm, struct stat *_fs, int _type, struct WALK *_state)); +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 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)); diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/wchar.h cdrtools-3.01a26~trusty/include/schily/wchar.h --- cdrtools-3.00~trusty~mc3man1/include/schily/wchar.h 2010-05-07 18:46:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/wchar.h 2011-07-19 18:06:51.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)wchar.h 1.17 10/05/07 Copyright 2007-2010 J. Schilling */ +/* @(#)wchar.h 1.21 11/07/19 Copyright 2007-2011 J. Schilling */ /* * Abstraction from wchar.h * - * Copyright (c) 2007-2010 J. Schilling + * Copyright (c) 2007-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -24,7 +24,7 @@ #endif #ifndef _SCHILY_STDLIB_H -#include /* for MB_CUR_MAX */ +#include /* for MB_CUR_MAX, mbtowc()/wctomb() */ #endif #ifndef _SCHILY_TYPES_H #include @@ -43,6 +43,15 @@ #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 @@ -57,7 +66,7 @@ #define mbrtowc(wp, cp, len, sp) mbtowc(wp, cp, len) #endif #ifndef HAVE_WCRTOMB -#define wcrtomb(cp, wc, sp) wcrtomb(cp, wc) +#define wcrtomb(cp, wc, sp) wctomb(cp, wc) #endif #ifndef USE_WCHAR @@ -97,8 +106,10 @@ * We cannot define wctype_t here because of a bug in Linux (missing xctype_t * definition in wchar.h */ -/*#undef wctype_t*/ -/*#define wctype_t int*/ +#ifdef __never__ +#undef wctype_t +#define wctype_t int +#endif #undef WEOF #define WEOF ((wint_t)-1) @@ -144,8 +155,8 @@ #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) +#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 @@ -154,6 +165,16 @@ #undef mbsinit #define mbsinit(sp) ((int)((sp) == 0)) -#endif /* !USE_WCHAR */ +#undef wcwidth +#define wcwidth(wc) (1) + +#else /* USE_WCHAR */ + +#ifndef HAVE_WCWIDTH +#undef wcwidth +#define wcwidth(wc) (1) +#endif + +#endif /* USE_WCHAR */ #endif /* _SCHILY_WCHAR_H */ diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/wctype.h cdrtools-3.01a26~trusty/include/schily/wctype.h --- cdrtools-3.00~trusty~mc3man1/include/schily/wctype.h 2009-06-29 21:48:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/wctype.h 2013-07-08 19:52:10.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)wctype.h 1.7 09/06/29 Copyright 2009 J. Schilling */ +/* @(#)wctype.h 1.8 13/07/08 Copyright 2009-2013 J. Schilling */ /* * Abstraction from wctype.h * - * Copyright (c) 2009 J. Schilling + * Copyright (c) 2009-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. @@ -58,7 +60,9 @@ #ifndef USE_WCTYPE -#include +#ifndef _SCHILY_CTYPE_H +#include +#endif #undef iswalnum #define iswalnum(c) isalnum(c) diff -Nru cdrtools-3.00~trusty~mc3man1/include/schily/windows.h cdrtools-3.01a26~trusty/include/schily/windows.h --- cdrtools-3.00~trusty~mc3man1/include/schily/windows.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/windows.mk cdrtools-3.01a26~trusty/include/schily/windows.mk --- cdrtools-3.00~trusty~mc3man1/include/schily/windows.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/include/schily/xconfig.h cdrtools-3.01a26~trusty/include/schily/xconfig.h --- cdrtools-3.00~trusty~mc3man1/include/schily/xconfig.h 2009-11-05 19:05:57.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/xconfig.h 2013-07-23 19:09:22.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)xconfig.h 1.8 09/11/05 Copyright 1995-2009 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-2009 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. @@ -119,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 @@ -130,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-3.00~trusty~mc3man1/include/schily/xmconfig.h cdrtools-3.01a26~trusty/include/schily/xmconfig.h --- cdrtools-3.00~trusty~mc3man1/include/schily/xmconfig.h 2009-11-15 23:00:07.000000000 +0000 +++ cdrtools-3.01a26~trusty/include/schily/xmconfig.h 2010-08-27 10:04:43.000000000 +0000 @@ -1,9 +1,9 @@ -/* @(#)xmconfig.h 1.42 09/11/16 Copyright 1995-2009 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-2009 J. Schilling + * Copyright (c) 1995-2010 J. Schilling * * Use only cpp instructions. * @@ -36,7 +36,7 @@ #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 @@ -80,81 +80,24 @@ # 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_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 */ @@ -182,7 +125,7 @@ /* 2005-03-14 SMS. Need VMS-specific open() parameters. */ #ifndef NO_OPENFD_SRC -# define _OPENFD_SRC /* Use VMS-specific _openfd() function.*/ +# 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 diff -Nru cdrtools-3.00~trusty~mc3man1/INSTALL cdrtools-3.01a26~trusty/INSTALL --- cdrtools-3.00~trusty~mc3man1/INSTALL 2010-05-15 16:06:27.000000000 +0000 +++ cdrtools-3.01a26~trusty/INSTALL 2014-12-03 19:11:38.000000000 +0000 @@ -22,7 +22,7 @@ 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 @@ -48,19 +48,19 @@ 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 - Replace 'star' 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 @@ -106,8 +106,8 @@ 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 + 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. @@ -165,12 +165,13 @@ 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 is stored inside the + that compiles or links programs, as the path is stored inside the binaries. The location for the root specific configuratin files is controlled @@ -184,6 +185,41 @@ 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 in a different ELF RUNPATH: In order to allow binaries to work correctly even if the shared @@ -199,14 +235,14 @@ Using a different man path prefix: - Man Pages are by default installed under: + 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=soething install + smake DEFMANBASE=something install to install man pages into $(INS_BASE)/something/man/* @@ -255,13 +291,13 @@ smake DEFINSUMASK=002 install -Using a different C-compiler: +Using a different C compiler: 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. + 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 C-compiler can be modified in the files in the + The default C compiler can be modified in the files in the DEFAULT directory. If you want to have a different compiler for one compilation, call: @@ -320,7 +356,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: @@ -340,14 +376,14 @@ export MAKEPROG exec gmake "$@" - and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make' + and call 'Gmake' instead of gmake. On Linux, there is no gmake, '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: @@ -355,7 +391,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: @@ -366,7 +402,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 @@ -377,8 +413,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 @@ -397,15 +433,38 @@ make clean make COPTX=-g LDOPTX=-g + If your debugger does not like optimized binaries, call something + like: -Creting Blastwave packages: + make "COPTX=-g -xO0" LDOPTX=-g + or + make "COPTX=-g -O0" LDOPTX=-g + + depending on the option system of 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 + + depending on the option system of 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 @@ -417,7 +476,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 @@ -430,6 +489,112 @@ 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 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 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_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 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" + + + Author: Joerg Schilling @@ -438,6 +603,6 @@ Germany Email: joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de - joerg.schilling@fokus.fraunhufer.de + joerg.schilling@fokus.fraunhofer.de Please mail bugs and suggestions to me. diff -Nru cdrtools-3.00~trusty~mc3man1/libcdrdeflt/libcdrdeflt-mapvers cdrtools-3.01a26~trusty/libcdrdeflt/libcdrdeflt-mapvers --- cdrtools-3.00~trusty~mc3man1/libcdrdeflt/libcdrdeflt-mapvers 2008-10-25 21:17:37.000000000 +0000 +++ cdrtools-3.01a26~trusty/libcdrdeflt/libcdrdeflt-mapvers 2010-10-02 20:09:14.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)libcdrdeflt-mapvers 1.1 08/10/25 Copyright 2008 J. Schilling +# /* @(#)libcdrdeflt-mapvers 1.2 10/10/02 Copyright 2008-2010 J. Schilling */ SCHILY_1.0 { diff -Nru cdrtools-3.00~trusty~mc3man1/libdeflt/default.c cdrtools-3.01a26~trusty/libdeflt/default.c --- cdrtools-3.00~trusty~mc3man1/libdeflt/default.c 2009-07-10 22:32:04.000000000 +0000 +++ cdrtools-3.01a26~trusty/libdeflt/default.c 2013-04-25 21:10:26.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)default.c 1.8 09/07/11 Copyright 1997-2009 J. Schilling */ +/* @(#)default.c 1.10 13/04/25 Copyright 1997-2013 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)default.c 1.8 09/07/11 Copyright 1997-2009 J. Schilling"; + "@(#)default.c 1.10 13/04/25 Copyright 1997-2013 J. Schilling"; #endif /* - * Copyright (c) 1997-2009 J. Schilling + * Copyright (c) 1997-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -22,15 +22,21 @@ #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)); @@ -51,6 +57,9 @@ if ((dfltfile = fopen(name, "r")) == (FILE *)NULL) { return (-1); } + dfltflags = DC_STD; + dfltsect = NULL; + return (0); } @@ -67,13 +76,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 +143,7 @@ if (dfltfile == (FILE *)NULL) { return ((char *)NULL); } - rewind(dfltfile); + defltfirst(); return (defltnext(name)); } @@ -107,8 +167,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 +193,9 @@ int cmd; int flags; { - int oldflags = 0; + int oldflags = dfltflags; + + dfltflags = flags; return (oldflags); } diff -Nru cdrtools-3.00~trusty~mc3man1/libdeflt/libdeflt-mapvers cdrtools-3.01a26~trusty/libdeflt/libdeflt-mapvers --- cdrtools-3.00~trusty~mc3man1/libdeflt/libdeflt-mapvers 2005-06-12 16:22:50.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libdeflt/libdeflt.mk cdrtools-3.01a26~trusty/libdeflt/libdeflt.mk --- cdrtools-3.00~trusty~mc3man1/libdeflt/libdeflt.mk 2005-06-12 23:23:36.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libedc/ecc.h cdrtools-3.01a26~trusty/libedc/ecc.h --- cdrtools-3.00~trusty~mc3man1/libedc/ecc.h 2006-05-15 19:14:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libedc/edc_ecc.c cdrtools-3.01a26~trusty/libedc/edc_ecc.c --- cdrtools-3.00~trusty~mc3man1/libedc/edc_ecc.c 2010-05-24 10:30:28.000000000 +0000 +++ cdrtools-3.01a26~trusty/libedc/edc_ecc.c 2013-04-28 13:44:05.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)edc_ecc.c 1.29 10/05/24 Copyright 1998-2010 Heiko Eissfeldt, Joerg Schilling */ +/* @(#)edc_ecc.c 1.31 13/04/28 Copyright 1998-2013 Heiko Eissfeldt, Joerg Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)edc_ecc.c 1.29 10/05/24 Copyright 1998-2010 Heiko Eissfeldt, Joerg Schilling"; + "@(#)edc_ecc.c 1.31 13/04/28 Copyright 1998-2013 Heiko Eissfeldt, Joerg Schilling"; #endif /* * Copyright 1998-2002,2008 by Heiko Eissfeldt - * Copyright 2002-2010 by Joerg Schilling + * Copyright 2002-2013 by Joerg Schilling * * This file contains protected intellectual property. * @@ -34,6 +34,7 @@ #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)) #endif @@ -58,8 +59,8 @@ #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 @@ -744,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; @@ -797,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; diff -Nru cdrtools-3.00~trusty~mc3man1/libedc/edc_ecc_dec.c cdrtools-3.01a26~trusty/libedc/edc_ecc_dec.c --- cdrtools-3.00~trusty~mc3man1/libedc/edc_ecc_dec.c 2010-05-24 13:50:38.000000000 +0000 +++ cdrtools-3.01a26~trusty/libedc/edc_ecc_dec.c 2013-04-28 13:44:05.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)edc_ecc_dec.c 1.12 10/05/24 Copyright 1998-2001 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling */ +/* @(#)edc_ecc_dec.c 1.13 13/04/28 Copyright 1998-2001 Heiko Eissfeldt, Copyright 2006-2013 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)edc_ecc_dec.c 1.12 10/05/24 Copyright 1998-2001 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling"; + "@(#)edc_ecc_dec.c 1.13 13/04/28 Copyright 1998-2001 Heiko Eissfeldt, Copyright 2006-2013 J. Schilling"; #endif /* @@ -11,7 +11,7 @@ * reed-solomon encoder / decoder for compact discs. * * Copyright 1998-2001 by Heiko Eissfeldt - * Copyright 2006-2010 by Joerg Schilling + * Copyright 2006-2013 by Joerg Schilling */ /* * The contents of this file are subject to the terms of the @@ -38,6 +38,7 @@ #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)) #endif diff -Nru cdrtools-3.00~trusty~mc3man1/libedc/edc.h cdrtools-3.01a26~trusty/libedc/edc.h --- cdrtools-3.00~trusty~mc3man1/libedc/edc.h 2006-05-15 19:14:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libedc/libedc_dec.mk cdrtools-3.01a26~trusty/libedc/libedc_dec.mk --- cdrtools-3.00~trusty~mc3man1/libedc/libedc_dec.mk 2008-12-22 12:15:58.000000000 +0000 +++ cdrtools-3.01a26~trusty/libedc/libedc_dec.mk 2010-06-23 20:48:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)libedc_dec.mk 1.2 08/12/22 " +#ident "@(#)libedc_dec.mk 1.3 10/06/23 " ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -16,7 +16,7 @@ # lines to fall back to the standard optimisation level. # _XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) -XARCH_OPT= $(_XARCH_OPT:%cc=-xarch=generic) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) SUNPROCOPTOPT= -fast $(XARCH_OPT) GCCOPTOPT= -O3 -fexpensive-optimizations diff -Nru cdrtools-3.00~trusty~mc3man1/libedc/libedc_dec_p.mk cdrtools-3.01a26~trusty/libedc/libedc_dec_p.mk --- cdrtools-3.00~trusty~mc3man1/libedc/libedc_dec_p.mk 2008-12-22 12:15:58.000000000 +0000 +++ cdrtools-3.01a26~trusty/libedc/libedc_dec_p.mk 2010-06-23 20:48:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libedc_dec_p.mk 1.4 08/12/22 +#ident @(#)libedc_dec_p.mk 1.5 10/06/23 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -19,7 +19,7 @@ # lines to fall back to the standard optimisation level. # _XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) -XARCH_OPT= $(_XARCH_OPT:%cc=-xarch=generic) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) SUNPROCOPTOPT= -fast $(XARCH_OPT) GCCOPTOPT= -O3 -fexpensive-optimizations diff -Nru cdrtools-3.00~trusty~mc3man1/libedc/libedc_ecc_dec-mapvers cdrtools-3.01a26~trusty/libedc/libedc_ecc_dec-mapvers --- cdrtools-3.00~trusty~mc3man1/libedc/libedc_ecc_dec-mapvers 2006-09-14 12:25:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libedc/libedc_ecc-mapvers cdrtools-3.01a26~trusty/libedc/libedc_ecc-mapvers --- cdrtools-3.00~trusty~mc3man1/libedc/libedc_ecc-mapvers 2006-05-15 19:14:32.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libedc/libedc.mk cdrtools-3.01a26~trusty/libedc/libedc.mk --- cdrtools-3.00~trusty~mc3man1/libedc/libedc.mk 2008-12-22 12:15:58.000000000 +0000 +++ cdrtools-3.01a26~trusty/libedc/libedc.mk 2010-06-23 20:48:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libedc.mk 1.6 08/12/22 +#ident @(#)libedc.mk 1.7 10/06/23 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -20,7 +20,7 @@ # lines to fall back to the standard optimisation level. # _XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) -XARCH_OPT= $(_XARCH_OPT:%cc=-xarch=generic) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) SUNPROCOPTOPT= -fast $(XARCH_OPT) GCCOPTOPT= -O3 -fexpensive-optimizations diff -Nru cdrtools-3.00~trusty~mc3man1/libedc/libedc_p.mk cdrtools-3.01a26~trusty/libedc/libedc_p.mk --- cdrtools-3.00~trusty~mc3man1/libedc/libedc_p.mk 2008-12-22 12:15:58.000000000 +0000 +++ cdrtools-3.01a26~trusty/libedc/libedc_p.mk 2010-06-23 20:48:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libedc_p.mk 1.4 08/12/22 +#ident @(#)libedc_p.mk 1.5 10/06/23 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -23,7 +23,7 @@ # lines to fall back to the standard optimisation level. # _XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) -XARCH_OPT= $(_XARCH_OPT:%cc=-xarch=generic) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) SUNPROCOPTOPT= -fast $(XARCH_OPT) GCCOPTOPT= -O3 -fexpensive-optimizations diff -Nru cdrtools-3.00~trusty~mc3man1/libedc/shledc_dec.mk cdrtools-3.01a26~trusty/libedc/shledc_dec.mk --- cdrtools-3.00~trusty~mc3man1/libedc/shledc_dec.mk 2008-12-22 12:15:58.000000000 +0000 +++ cdrtools-3.01a26~trusty/libedc/shledc_dec.mk 2010-06-23 20:48:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)shledc_dec.mk 1.3 08/12/22 +#ident @(#)shledc_dec.mk 1.4 10/06/23 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -17,7 +17,7 @@ # lines to fall back to the standard optimisation level. # _XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) -XARCH_OPT= $(_XARCH_OPT:%cc=-xarch=generic) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) SUNPROCOPTOPT= -fast $(XARCH_OPT) GCCOPTOPT= -O3 -fexpensive-optimizations diff -Nru cdrtools-3.00~trusty~mc3man1/libedc/shledc.mk cdrtools-3.01a26~trusty/libedc/shledc.mk --- cdrtools-3.00~trusty~mc3man1/libedc/shledc.mk 2008-12-22 12:15:58.000000000 +0000 +++ cdrtools-3.01a26~trusty/libedc/shledc.mk 2010-06-23 20:48:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)shledc.mk 1.3 08/12/22 +#ident @(#)shledc.mk 1.4 10/06/23 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -21,7 +21,7 @@ # lines to fall back to the standard optimisation level. # _XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) -XARCH_OPT= $(_XARCH_OPT:%cc=-xarch=generic) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) SUNPROCOPTOPT= -fast $(XARCH_OPT) GCCOPTOPT= -O3 -fexpensive-optimizations diff -Nru cdrtools-3.00~trusty~mc3man1/libfile/libfile-mapvers cdrtools-3.01a26~trusty/libfile/libfile-mapvers --- cdrtools-3.00~trusty~mc3man1/libfile/libfile-mapvers 2005-06-12 19:04:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libfind/fetchdir.c cdrtools-3.01a26~trusty/libfind/fetchdir.c --- cdrtools-3.00~trusty~mc3man1/libfind/fetchdir.c 2009-07-10 22:14:37.000000000 +0000 +++ cdrtools-3.01a26~trusty/libfind/fetchdir.c 2013-04-28 14:26:56.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)fetchdir.c 1.27 09/07/11 Copyright 2002-2009 J. Schilling */ +/* @(#)fetchdir.c 1.28 13/04/28 Copyright 2002-2013 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)fetchdir.c 1.27 09/07/11 Copyright 2002-2009 J. Schilling"; + "@(#)fetchdir.c 1.28 13/04/28 Copyright 2002-2013 J. Schilling"; #endif /* * Blocked directory handling. * - * Copyright (c) 2002-2009 J. Schilling + * Copyright (c) 2002-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -38,7 +38,7 @@ #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 char *dfetchdir __PR((DIR *dir, char *dir_name, int *entp, int *lenp, ino_t **inop)); EXPORT char * fetchdir(dir, entp, lenp, inop) @@ -66,9 +66,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; @@ -121,9 +121,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; diff -Nru cdrtools-3.00~trusty~mc3man1/libfind/find.c cdrtools-3.01a26~trusty/libfind/find.c --- cdrtools-3.00~trusty~mc3man1/libfind/find.c 2010-04-27 18:42:14.000000000 +0000 +++ cdrtools-3.01a26~trusty/libfind/find.c 2013-11-19 22:07:47.000000000 +0000 @@ -1,14 +1,14 @@ /*#define PLUS_DEBUG*/ -/* @(#)find.c 1.90 10/04/27 Copyright 2004-2010 J. Schilling */ +/* @(#)find.c 1.98 13/11/19 Copyright 2004-2013 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)find.c 1.90 10/04/27 Copyright 2004-2010 J. Schilling"; + "@(#)find.c 1.98 13/11/19 Copyright 2004-2013 J. Schilling"; #endif /* * Another find implementation... * - * Copyright (c) 2004-2010 J. Schilling + * Copyright (c) 2004-2013 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. @@ -169,6 +171,8 @@ 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 @@ -177,7 +181,9 @@ #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)); @@ -185,7 +191,9 @@ 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 @@ -840,9 +848,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 */ @@ -1246,6 +1259,37 @@ 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) @@ -1440,6 +1484,7 @@ closedir(d); return (FALSE); } + closedir(d); return (TRUE); } return (FALSE); @@ -1694,13 +1739,29 @@ 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, + gettext( + "'-%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, + gettext( + "'-%s' is unsupported on this platform, returning FALSE.\n"), + find_tname(t->op)); + return (FALSE); +#endif case FPRINT: fp = t->val.fp; @@ -1772,6 +1833,7 @@ return (FALSE); /* Unknown operator ??? */ } +#ifdef HAVE_FORK LOCAL BOOL doexec(f, t, ac, av, state) char *f; @@ -1897,6 +1959,7 @@ return (-1); } } +#endif /* HAVE FORK */ #ifndef LINE_MAX #define LINE_MAX 1024 @@ -2009,7 +2072,7 @@ char *xname; char elfbuf[8]; - xname = findinpath(name, X_OK, TRUE); + xname = findinpath(name, X_OK, TRUE, NULL); if (name == NULL) xname = name; @@ -2168,6 +2231,7 @@ return (TRUE); } +#ifdef HAVE_FORK LOCAL BOOL plusexec(f, t, state) char *f; @@ -2221,6 +2285,7 @@ #endif return (ret); } +#endif /* HAVE_FORK */ EXPORT int find_plusflush(p, state) @@ -2239,8 +2304,10 @@ #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; } @@ -2341,8 +2408,6 @@ char *optstr; long *argp; { -/* error("optstr: '%s'\n", optstr);*/ - if (optstr[1] != '\0') return (-1); @@ -2369,9 +2434,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; diff -Nru cdrtools-3.00~trusty~mc3man1/libfind/find_list.c cdrtools-3.01a26~trusty/libfind/find_list.c --- cdrtools-3.00~trusty~mc3man1/libfind/find_list.c 2009-07-10 22:14:37.000000000 +0000 +++ cdrtools-3.01a26~trusty/libfind/find_list.c 2010-08-23 13:57:57.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)find_list.c 1.25 09/07/11 Copyright 1985, 1995, 2000-2009 J. Schilling*/ +/* @(#)find_list.c 1.27 10/08/23 Copyright 1985, 1995, 2000-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)find_list.c 1.25 09/07/11 Copyright 1985, 1995, 2000-2009 J. Schilling"; + "@(#)find_list.c 1.27 10/08/23 Copyright 1985, 1995, 2000-2010 J. Schilling"; #endif /* * List a file * - * Copyright (c) 1985, 1995, 2000-2009 J. Schilling + * Copyright (c) 1985, 1995, 2000-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -56,8 +56,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)); +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. @@ -188,13 +192,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); } @@ -282,9 +288,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-3.00~trusty~mc3man1/libfind/find_main.c cdrtools-3.01a26~trusty/libfind/find_main.c --- cdrtools-3.00~trusty~mc3man1/libfind/find_main.c 2010-04-21 22:16:48.000000000 +0000 +++ cdrtools-3.01a26~trusty/libfind/find_main.c 2010-08-23 13:57:06.000000000 +0000 @@ -1,9 +1,9 @@ /*#define PLUS_DEBUG*/ -/* @(#)find_main.c 1.66 10/04/22 Copyright 2004-2010 J. Schilling */ +/* @(#)find_main.c 1.68 10/08/23 Copyright 2004-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)find_main.c 1.66 10/04/22 Copyright 2004-2010 J. Schilling"; + "@(#)find_main.c 1.68 10/08/23 Copyright 2004-2010 J. Schilling"; #endif /* * Another find implementation... @@ -98,7 +98,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); @@ -129,9 +131,9 @@ 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; diff -Nru cdrtools-3.00~trusty~mc3man1/libfind/libfind-mapvers cdrtools-3.01a26~trusty/libfind/libfind-mapvers --- cdrtools-3.00~trusty~mc3man1/libfind/libfind-mapvers 2008-04-06 18:32:25.000000000 +0000 +++ cdrtools-3.01a26~trusty/libfind/libfind-mapvers 2010-10-02 20:06:17.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)libfind-mapvers 1.9 08/04/06 Copyright 2005-2008 J. Schilling +# /* @(#)libfind-mapvers 1.10 10/10/02 Copyright 2005-2010 J. Schilling */ SCHILY_0.1 { # Not yet a stable interface! global: diff -Nru cdrtools-3.00~trusty~mc3man1/libfind/libfind.mk cdrtools-3.01a26~trusty/libfind/libfind.mk --- cdrtools-3.00~trusty~mc3man1/libfind/libfind.mk 2007-02-03 23:00:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/libfind/libfind.mk 2010-12-23 21:00:40.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libfind.mk 1.2 07/02/04 +#ident @(#)libfind.mk 1.3 10/12/23 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -25,3 +25,4 @@ ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.lib ########################################################################### + diff -Nru cdrtools-3.00~trusty~mc3man1/libfind/walk.c cdrtools-3.01a26~trusty/libfind/walk.c --- cdrtools-3.00~trusty~mc3man1/libfind/walk.c 2010-02-28 14:32:32.000000000 +0000 +++ cdrtools-3.01a26~trusty/libfind/walk.c 2011-10-18 22:02:42.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)walk.c 1.39 10/02/28 Copyright 2004-2010 J. Schilling */ +/* @(#)walk.c 1.44 11/10/19 Copyright 2004-2011 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)walk.c 1.39 10/02/28 Copyright 2004-2010 J. Schilling"; + "@(#)walk.c 1.44 11/10/19 Copyright 2004-2011 J. Schilling"; #endif /* * Walk a directory tree * - * Copyright (c) 2004-2010 J. Schilling + * Copyright (c) 2004-2011 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. @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -85,10 +86,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 */ @@ -110,7 +114,7 @@ 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)); +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)); @@ -137,19 +141,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; /* @@ -157,7 +173,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) ; @@ -201,8 +218,16 @@ state->base = otail; state->flags = 0; if (varp->Curdtail == 0 || varp->Curdir[varp->Curdtail-1] == '/') { - p = strcatl(&varp->Curdir[varp->Curdtail], nm, (char *)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, (char *)0); varp->Curdtail = p - varp->Curdir; @@ -369,9 +394,15 @@ 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; + } state->level++; ret = walk(name, sf, fn, state, &thisd); state->level--; @@ -401,8 +432,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. @@ -416,22 +454,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; @@ -450,23 +496,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); } @@ -489,7 +542,7 @@ #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) @@ -500,7 +553,7 @@ 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) { @@ -551,6 +604,10 @@ #else varp->Home[0] = '\0'; #endif + if (varp->Flags & TW_MALLOC) { + free(varp); + state->twprivate = NULL; + } return (ret); } diff -Nru cdrtools-3.00~trusty~mc3man1/libhfs_iso/data.c cdrtools-3.01a26~trusty/libhfs_iso/data.c --- cdrtools-3.00~trusty~mc3man1/libhfs_iso/data.c 2009-07-10 22:42:35.000000000 +0000 +++ cdrtools-3.01a26~trusty/libhfs_iso/data.c 2013-04-30 05:11:35.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)data.c 1.8 09/07/11 joerg */ +/* @(#)data.c 1.9 13/04/30 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)data.c 1.8 09/07/11 joerg"; + "@(#)data.c 1.9 13/04/30 joerg"; #endif /* * hfsutils - tools for reading and writing Macintosh HFS volumes @@ -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-3.00~trusty~mc3man1/libhfs_iso/hfs.h cdrtools-3.01a26~trusty/libhfs_iso/hfs.h --- cdrtools-3.00~trusty~mc3man1/libhfs_iso/hfs.h 2006-09-13 14:04:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libhfs_iso/libhfs-mapvers cdrtools-3.01a26~trusty/libhfs_iso/libhfs-mapvers --- cdrtools-3.00~trusty~mc3man1/libhfs_iso/libhfs-mapvers 2005-06-12 20:07:46.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libmdigest/libdigest-mapvers cdrtools-3.01a26~trusty/libmdigest/libdigest-mapvers --- cdrtools-3.00~trusty~mc3man1/libmdigest/libdigest-mapvers 2009-08-08 23:25:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/libmdigest/libdigest-mapvers 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -SCHILY_1.0 { -global: - MD4Final; - MD4Init; - MD4Pad; - MD4Transform; - MD4Update; - - MD5Final; - MD5Init; - MD5Pad; - MD5Transform; - MD5Update; - -# MD5End; -# MD5File; -# MD5FileChunk; -# MD5Data; - - 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-3.00~trusty~mc3man1/libmdigest/libmdigest-mapvers cdrtools-3.01a26~trusty/libmdigest/libmdigest-mapvers --- cdrtools-3.00~trusty~mc3man1/libmdigest/libmdigest-mapvers 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/libmdigest/libmdigest-mapvers 2010-10-02 20:09:34.000000000 +0000 @@ -0,0 +1,56 @@ +# /* %Z%%M% %I% %E% Copyright 2009-2010 J. Schilling */ + +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-3.00~trusty~mc3man1/libmdigest/mdigest.mk cdrtools-3.01a26~trusty/libmdigest/mdigest.mk --- cdrtools-3.00~trusty~mc3man1/libmdigest/mdigest.mk 2009-06-23 19:57:03.000000000 +0000 +++ cdrtools-3.01a26~trusty/libmdigest/mdigest.mk 2010-06-23 20:49:56.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)mdigest.mk 1.3 09/06/23 " +#ident "@(#)mdigest.mk 1.4 10/06/23 " ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -20,7 +20,7 @@ # lines to fall back to the standard optimisation level. # _XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) -XARCH_OPT= $(_XARCH_OPT:%cc=-xarch=generic) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) SUNPROCOPTOPT= -fast $(XARCH_OPT) GCCOPTOPT= -O3 -fexpensive-optimizations diff -Nru cdrtools-3.00~trusty~mc3man1/libmdigest/sha1.c cdrtools-3.01a26~trusty/libmdigest/sha1.c --- cdrtools-3.00~trusty~mc3man1/libmdigest/sha1.c 2009-08-01 19:02:04.000000000 +0000 +++ cdrtools-3.01a26~trusty/libmdigest/sha1.c 2012-12-02 12:14:13.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)sha1.c 1.2 09/08/01 2009 J. Schilling */ +/* @(#)sha1.c 1.3 12/12/02 2009-2012 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)sha1.c 1.2 09/08/01 2009 J. Schilling"; + "@(#)sha1.c 1.3 12/12/02 2009-2012 J. Schilling"; #endif /* * SHA1 hash code taken from OpenBSD * - * Portions Copyright (c) 2009 J. Schilling + * Portions Copyright (c) 2009-2012 J. Schilling */ /* $OpenBSD: sha1.c,v 1.21 2008/07/29 19:32:50 miod Exp $ */ @@ -82,6 +82,7 @@ #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) { @@ -121,6 +122,7 @@ 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 /* @@ -150,6 +152,7 @@ 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); @@ -171,6 +174,7 @@ 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[] */ diff -Nru cdrtools-3.00~trusty~mc3man1/libmdigest/sha2.c cdrtools-3.01a26~trusty/libmdigest/sha2.c --- cdrtools-3.00~trusty~mc3man1/libmdigest/sha2.c 2009-08-11 18:06:02.000000000 +0000 +++ cdrtools-3.01a26~trusty/libmdigest/sha2.c 2013-07-30 19:41:28.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)sha2.c 1.3 09/08/11 2009 J. Schilling */ +/* @(#)sha2.c 1.5 13/07/30 2009-2013 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)sha2.c 1.3 09/08/11 2009 J. Schilling"; + "@(#)sha2.c 1.5 13/07/30 2009-2013 J. Schilling"; #endif /* * SHA2 hash code taken from OpenBSD * - * Portions Copyright (c) 2009 J. Schilling + * Portions Copyright (c) 2009-2013 J. Schilling */ /* $OpenBSD: sha2.c,v 1.13 2009/04/15 00:55:52 djm Exp $ */ @@ -963,7 +963,12 @@ context->bitcount[0] = context->bitcount[1] = 0; } -#ifdef HAVE_PRAGMA_WEAK +/* + * 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. + */ +#if defined(HAVE_PRAGMA_WEAK) && !defined(__CYGWIN32__) && !defined(__CYGWIN__) #pragma weak SHA384Transform = SHA512Transform #pragma weak SHA384Update = SHA512Update #pragma weak SHA384Pad = SHA512Pad diff -Nru cdrtools-3.00~trusty~mc3man1/libmdigest/shlmdigest.mk cdrtools-3.01a26~trusty/libmdigest/shlmdigest.mk --- cdrtools-3.00~trusty~mc3man1/libmdigest/shlmdigest.mk 2009-06-23 19:57:03.000000000 +0000 +++ cdrtools-3.01a26~trusty/libmdigest/shlmdigest.mk 2010-06-23 20:49:56.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)shlmdigest.mk 1.3 09/06/23 " +#ident "@(#)shlmdigest.mk 1.4 10/06/23 " ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -21,7 +21,7 @@ # lines to fall back to the standard optimisation level. # _XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) -XARCH_OPT= $(_XARCH_OPT:%cc=-xarch=generic) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) SUNPROCOPTOPT= -fast $(XARCH_OPT) GCCOPTOPT= -O3 -fexpensive-optimizations diff -Nru cdrtools-3.00~trusty~mc3man1/libparanoia/cdda_paranoia.h cdrtools-3.01a26~trusty/libparanoia/cdda_paranoia.h --- cdrtools-3.00~trusty~mc3man1/libparanoia/cdda_paranoia.h 2009-11-07 17:34:51.000000000 +0000 +++ cdrtools-3.01a26~trusty/libparanoia/cdda_paranoia.h 2013-12-22 12:05:47.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)cdda_paranoia.h 1.27 09/11/07 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,2008 by Monty (xiphmont@mit.edu) - * Copyright (C) 2002-2008 by J. Schilling + * Copyright (C) 2002-2013 by J. Schilling */ #ifndef _CDROM_PARANOIA_H @@ -17,14 +17,18 @@ #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 */ @@ -35,11 +39,16 @@ #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 */ @@ -48,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 @@ -56,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, @@ -69,15 +98,39 @@ 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 diff -Nru cdrtools-3.00~trusty~mc3man1/libparanoia/libparanoia-mapvers cdrtools-3.01a26~trusty/libparanoia/libparanoia-mapvers --- cdrtools-3.00~trusty~mc3man1/libparanoia/libparanoia-mapvers 2005-06-12 19:21:42.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libparanoia/paranoia.c cdrtools-3.01a26~trusty/libparanoia/paranoia.c --- cdrtools-3.00~trusty~mc3man1/libparanoia/paranoia.c 2009-07-10 22:28:18.000000000 +0000 +++ cdrtools-3.01a26~trusty/libparanoia/paranoia.c 2013-12-24 13:55:36.000000000 +0000 @@ -1,14 +1,14 @@ -/* @(#)paranoia.c 1.42 09/07/11 J. Schilling from cdparanoia-III-alpha9.8 */ +/* @(#)paranoia.c 1.46 13/12/24 J. Schilling from cdparanoia-III-alpha9.8 */ #include #ifndef lint static UConst char sccsid[] = -"@(#)paranoia.c 1.42 09/07/11 J. Schilling from cdparanoia-III-alpha9.8"; +"@(#)paranoia.c 1.46 13/12/24 J. Schilling from cdparanoia-III-alpha9.8"; #endif /* * CopyPolicy: GNU Lesser General Public License v2.1 applies * Copyright (C) 1997-2001,2008 by Monty (xiphmont@mit.edu) - * Copyright (C) 2002-2009 by J. Schilling + * Copyright (C) 2002-2013 by J. Schilling * * Toplevel file for the paranoia abstraction over the cdda lib * @@ -98,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)); @@ -145,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))); @@ -152,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; @@ -164,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; @@ -175,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; @@ -186,6 +207,9 @@ return (cs(root->vector)); } +/* + * Return data vector from current block. + */ LOCAL inline Int16_t * rv(root) root_block *root; @@ -213,6 +237,7 @@ #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 @@ -1244,18 +1269,23 @@ * 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 } /* @@ -2590,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 @@ -2634,6 +2695,101 @@ 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++; +} + /* * read_c_block() (internal) * @@ -2772,8 +2928,8 @@ 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; @@ -2816,6 +2972,7 @@ secread = sectatonce - reduce; if (secread > 0) { + struct c2errs c2errs; if (firstread < 0) firstread = adjread; @@ -2839,7 +2996,7 @@ * 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 * CD_FRAMEWORDS, adjread, + if ((thisread = p->d_read(p->d, buffer + sofar * p->sectwords, adjread, secread)) < secread) { if (thisread < 0) @@ -2886,13 +3043,28 @@ for (i = -MIN_WORDS_OVERLAP / 2; i < MIN_WORDS_OVERLAP / 2; i++) 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 (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; @@ -2919,7 +3091,11 @@ */ 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; diff -Nru cdrtools-3.00~trusty~mc3man1/libparanoia/p_block.c cdrtools-3.01a26~trusty/libparanoia/p_block.c --- cdrtools-3.00~trusty~mc3man1/libparanoia/p_block.c 2009-07-10 22:28:18.000000000 +0000 +++ cdrtools-3.01a26~trusty/libparanoia/p_block.c 2013-12-22 12:05:47.000000000 +0000 @@ -1,14 +1,14 @@ -/* @(#)p_block.c 1.28 09/07/11 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 UConst char sccsid[] = -"@(#)p_block.c 1.28 09/07/11 J. Schilling from cdparanoia-III-alpha9.8"; +"@(#)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,2008 by Monty (xiphmont@mit.edu) - * Copyright (C) 2002-2009 by J. Schilling + * Copyright (C) 2002-2013 by J. Schilling */ #include #include @@ -578,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; diff -Nru cdrtools-3.00~trusty~mc3man1/libparanoia/p_block.h cdrtools-3.01a26~trusty/libparanoia/p_block.h --- cdrtools-3.00~trusty~mc3man1/libparanoia/p_block.h 2007-02-09 11:28:35.000000000 +0000 +++ cdrtools-3.01a26~trusty/libparanoia/p_block.h 2013-12-22 12:05:47.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.20 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) 2002-2013 by J. Schilling */ #ifndef _P_BLOCK_H @@ -17,8 +17,10 @@ #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 min +#define min(x, y) ((x) < (y) ? (x) : (y)) +#undef max +#define max(x, y) ((x) < (y) ? (y) : (x)) #include "isort.h" @@ -56,8 +58,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 +151,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 +165,7 @@ int jitter; long lastread; - int enable; + int enable; /* modes from paranoia_modeset() */ long cursor; long current_lastsector; long current_firstsector; diff -Nru cdrtools-3.00~trusty~mc3man1/librscg/scsi-remote.c cdrtools-3.01a26~trusty/librscg/scsi-remote.c --- cdrtools-3.00~trusty~mc3man1/librscg/scsi-remote.c 2009-08-24 12:48:02.000000000 +0000 +++ cdrtools-3.01a26~trusty/librscg/scsi-remote.c 2013-04-21 18:23:45.000000000 +0000 @@ -1,8 +1,8 @@ #define USE_REMOTE -/* @(#)scsi-remote.c 1.33 09/08/24 Copyright 1990,2000-2009 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.33 09/08/24 Copyright 1990,2000-2009 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-2009 J. Schilling + * Copyright (c) 1990,2000-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -81,7 +81,7 @@ #if defined(IS_CYGWIN) || defined(__MINGW32__) #define privport_ok() (1) #else -#ifdef HAVE_SOLARIS_PPRIV +#if defined(HAVE_SOLARIS_PPRIV) || defined(HAVE_LINUX_CAPS) #define privport_ok() ppriv_ok() #else #define privport_ok() (geteuid() == 0) @@ -100,7 +100,7 @@ /*extern BOOL debug;*/ LOCAL BOOL debug = 1; -LOCAL char _scg_trans_version[] = "remote-1.33"; /* 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)); @@ -154,7 +154,7 @@ const char *remuser, const char *cmd, const char *rsh)); -#ifdef HAVE_SOLARIS_PPRIV +#if defined(HAVE_SOLARIS_PPRIV) || defined(HAVE_LINUX_CAPS) LOCAL BOOL ppriv_ok __PR((void)); #endif #endif @@ -1213,6 +1213,22 @@ return (net_privaddr); } +#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-3.00~trusty~mc3man1/librscg/shlrscg.mk cdrtools-3.01a26~trusty/librscg/shlrscg.mk --- cdrtools-3.00~trusty~mc3man1/librscg/shlrscg.mk 2008-08-03 17:36:03.000000000 +0000 +++ cdrtools-3.01a26~trusty/librscg/shlrscg.mk 2013-04-22 17:50:59.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)shlrscg.mk 1.4 08/08/03 +#ident @(#)shlrscg.mk 1.5 13/04/22 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -17,7 +17,10 @@ #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-3.00~trusty~mc3man1/libscg/libscg-mapvers cdrtools-3.01a26~trusty/libscg/libscg-mapvers --- cdrtools-3.00~trusty~mc3man1/libscg/libscg-mapvers 2007-03-08 13:22:25.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libscg/libscg.mk cdrtools-3.01a26~trusty/libscg/libscg.mk --- cdrtools-3.00~trusty~mc3man1/libscg/libscg.mk 2008-07-31 22:51:33.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/libscg.mk 2011-03-07 22:51:28.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libscg.mk 1.3 08/08/01 +#ident @(#)libscg.mk 1.5 11/03/07 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -21,3 +21,4 @@ ########################################################################### #CC= echo " ==> COMPILING \"$@\""; cc ########################################################################### + diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/aspi-dos.h cdrtools-3.01a26~trusty/libscg/scg/aspi-dos.h --- cdrtools-3.00~trusty~mc3man1/libscg/scg/aspi-dos.h 2005-05-14 22:48:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libscg/scg/aspi-dos.mk cdrtools-3.01a26~trusty/libscg/scg/aspi-dos.mk --- cdrtools-3.00~trusty~mc3man1/libscg/scg/aspi-dos.mk 2008-07-07 15:55:07.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/aspi-dos.mk 2008-07-07 15:55:07.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)aspi-dos.mk 1.1 08/07/07 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -15,11 +15,3 @@ include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### -IFDEF= -UJOSxx - -XRELFILES= aspi-dos.h aspi-dos.mk - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.rel -########################################################################### -MAKE_LICENSE=MKCDDL diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/aspi-win32.h cdrtools-3.01a26~trusty/libscg/scg/aspi-win32.h --- cdrtools-3.00~trusty~mc3man1/libscg/scg/aspi-win32.h 2008-08-03 11:38:06.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/aspi-win32.h 2012-12-31 15:57:33.000000000 +0000 @@ -1,9 +1,20 @@ -/* @(#)aspi-win32.h 1.2 08/08/03 1999-2008 J. Schilling */ +/* @(#)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-3.00~trusty~mc3man1/libscg/scg/aspi-win32.mk cdrtools-3.01a26~trusty/libscg/scg/aspi-win32.mk --- cdrtools-3.00~trusty~mc3man1/libscg/scg/aspi-win32.mk 2008-07-07 15:57:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/aspi-win32.mk 2008-07-07 15:57:45.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)aspi-win32.mk 1.1 08/07/07 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -15,11 +15,3 @@ include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### -IFDEF= -UJOSxx - -XRELFILES= aspi-win32.h aspi-win32.mk - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.rel -########################################################################### -MAKE_LICENSE=MKCDDL diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/Makefile cdrtools-3.01a26~trusty/libscg/scg/Makefile --- cdrtools-3.00~trusty~mc3man1/libscg/scg/Makefile 2008-07-07 16:01:18.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/Makefile 2008-07-07 16:01:18.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)Makefile 1.1 08/07/07 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/scgcmd.mk cdrtools-3.01a26~trusty/libscg/scg/scgcmd.mk --- cdrtools-3.00~trusty~mc3man1/libscg/scg/scgcmd.mk 2008-07-07 15:58:01.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/scgcmd.mk 2008-07-07 15:58:01.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)scgcmd.mk 1.1 08/07/07 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -15,11 +15,3 @@ include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### -IFDEF= -UJOSxx - -XRELFILES= scgcmd.h scgcmd.mk - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.rel -########################################################################### -MAKE_LICENSE=MKCDDL diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/scgio.mk cdrtools-3.01a26~trusty/libscg/scg/scgio.mk --- cdrtools-3.00~trusty~mc3man1/libscg/scg/scgio.mk 2008-07-07 15:58:20.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/scgio.mk 2008-07-07 15:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)scgio.mk 1.1 08/07/07 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -15,11 +15,3 @@ include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### -IFDEF= -UJOSxx - -XRELFILES= scgio.h scgio.mk - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.rel -########################################################################### -MAKE_LICENSE=MKCDDL diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/scgops.mk cdrtools-3.01a26~trusty/libscg/scg/scgops.mk --- cdrtools-3.00~trusty~mc3man1/libscg/scg/scgops.mk 2008-07-07 15:58:34.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/scgops.mk 2008-07-07 15:58:34.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)scgops.mk 1.1 08/07/07 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -15,11 +15,3 @@ include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### -IFDEF= -UJOSxx - -XRELFILES= scgops.h scgops.mk - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.rel -########################################################################### -MAKE_LICENSE=MKCDDL diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/scsicdb.mk cdrtools-3.01a26~trusty/libscg/scg/scsicdb.mk --- cdrtools-3.00~trusty~mc3man1/libscg/scg/scsicdb.mk 2008-07-07 15:58:54.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/scsicdb.mk 2008-07-07 15:58:54.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)scsicdb.mk 1.1 08/07/07 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -15,11 +15,3 @@ include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### -IFDEF= -UJOSxx - -XRELFILES= scsicdb.h scsicdb.mk - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.rel -########################################################################### -MAKE_LICENSE=MKCDDL diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/scsidefs.mk cdrtools-3.01a26~trusty/libscg/scg/scsidefs.mk --- cdrtools-3.00~trusty~mc3man1/libscg/scg/scsidefs.mk 2008-07-07 15:59:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/scsidefs.mk 2008-07-07 15:59:09.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)scsidefs.mk 1.1 08/07/07 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -15,11 +15,3 @@ include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### -IFDEF= -UJOSxx - -XRELFILES= scsidefs.h scsidefs.mk - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.rel -########################################################################### -MAKE_LICENSE=MKCDDL diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/scsireg.h cdrtools-3.01a26~trusty/libscg/scg/scsireg.h --- cdrtools-3.00~trusty~mc3man1/libscg/scg/scsireg.h 2010-05-16 17:20:21.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/scsireg.h 2012-03-15 23:34:36.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)scsireg.h 1.34 10/05/16 Copyright 1987-2010 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-2010 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 */ diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/scsireg.mk cdrtools-3.01a26~trusty/libscg/scg/scsireg.mk --- cdrtools-3.00~trusty~mc3man1/libscg/scg/scsireg.mk 2008-07-07 15:59:24.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/scsireg.mk 2008-07-07 15:59:24.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)scsireg.mk 1.1 08/07/07 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -15,11 +15,3 @@ include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### -IFDEF= -UJOSxx - -XRELFILES= scsireg.h scsireg.mk - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.rel -########################################################################### -MAKE_LICENSE=MKCDDL diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/scsisense.mk cdrtools-3.01a26~trusty/libscg/scg/scsisense.mk --- cdrtools-3.00~trusty~mc3man1/libscg/scg/scsisense.mk 2008-07-07 15:59:41.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/scsisense.mk 2008-07-07 15:59:41.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)scsisense.mk 1.1 08/07/07 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -15,11 +15,3 @@ include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### -IFDEF= -UJOSxx - -XRELFILES= scsisense.h scsisense.mk - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.rel -########################################################################### -MAKE_LICENSE=MKCDDL diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/scsitransp.h cdrtools-3.01a26~trusty/libscg/scg/scsitransp.h --- cdrtools-3.00~trusty~mc3man1/libscg/scg/scsitransp.h 2007-07-07 12:53:11.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/scsitransp.h 2013-05-28 18:18:09.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)scsitransp.h 1.56 07/07/07 Copyright 1995-2007 J. Schilling */ +/* @(#)scsitransp.h 1.57 13/05/28 Copyright 1995-2013 J. Schilling */ /* * Definitions for commands that use functions from scsitransp.c * - * Copyright (c) 1995-2007 J. Schilling + * Copyright (c) 1995-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -99,7 +99,8 @@ /* * 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 */ /* * Drive specific flags for struct SCSI: diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/scsitransp.mk cdrtools-3.01a26~trusty/libscg/scg/scsitransp.mk --- cdrtools-3.00~trusty~mc3man1/libscg/scg/scsitransp.mk 2008-07-07 16:00:03.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/scsitransp.mk 2008-07-07 16:00:03.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)scsitransp.mk 1.1 08/07/07 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -15,11 +15,3 @@ include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### -IFDEF= -UJOSxx - -XRELFILES= scsitransp.h scsitransp.mk - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.rel -########################################################################### -MAKE_LICENSE=MKCDDL diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/spti-wnt.h cdrtools-3.01a26~trusty/libscg/scg/spti-wnt.h --- cdrtools-3.00~trusty~mc3man1/libscg/scg/spti-wnt.h 2008-08-03 11:35:59.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/spti-wnt.h 2011-08-02 18:28:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)spti-wnt.h 1.2 08/08/03 2004-2008 J. Schilling */ +/* @(#)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 @@ -6,7 +6,7 @@ #ifndef _SCSIPT_H_INC #define _SCSIPT_H_INC -#include +#include typedef struct { USHORT Length; @@ -101,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 @@ -119,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-3.00~trusty~mc3man1/libscg/scg/spti-wnt.mk cdrtools-3.01a26~trusty/libscg/scg/spti-wnt.mk --- cdrtools-3.00~trusty~mc3man1/libscg/scg/spti-wnt.mk 2008-07-07 16:00:20.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/spti-wnt.mk 2008-07-07 16:00:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)spti-wnt.mk 1.1 08/07/07 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -15,11 +15,3 @@ include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### -IFDEF= -UJOSxx - -XRELFILES= spti-wnt.h spti-wnt.mk - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.rel -########################################################################### -MAKE_LICENSE=MKCDDL diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scg/srb_os2.mk cdrtools-3.01a26~trusty/libscg/scg/srb_os2.mk --- cdrtools-3.00~trusty~mc3man1/libscg/scg/srb_os2.mk 2008-07-07 16:00:38.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scg/srb_os2.mk 2008-07-07 16:00:38.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)srb_os2.mk 1.1 08/07/07 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -15,11 +15,3 @@ include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### -IFDEF= -UJOSxx - -XRELFILES= srb_os2.h srb_os2.mk - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.rel -########################################################################### -MAKE_LICENSE=MKCDDL diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scsi-aix.c cdrtools-3.01a26~trusty/libscg/scsi-aix.c --- cdrtools-3.00~trusty~mc3man1/libscg/scsi-aix.c 2006-11-26 17:12:57.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libscg/scsi-apollo.c cdrtools-3.01a26~trusty/libscg/scsi-apollo.c --- cdrtools-3.00~trusty~mc3man1/libscg/scsi-apollo.c 2006-11-26 17:12:57.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libscg/scsi-bsd.c cdrtools-3.01a26~trusty/libscg/scsi-bsd.c --- cdrtools-3.00~trusty~mc3man1/libscg/scsi-bsd.c 2010-05-29 13:17:37.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scsi-bsd.c 2011-01-01 18:14:25.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-bsd.c 1.51 10/05/22 Copyright 1997-2009 J. Schilling */ +/* @(#)scsi-bsd.c 1.52 11/01/01 Copyright 1997-2011 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-bsd.c 1.51 10/05/22 Copyright 1997-2009 J. Schilling"; + "@(#)scsi-bsd.c 1.52 11/01/01 Copyright 1997-2011 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-2009 J. Schilling + * Copyright (c) 1997-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -57,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-bsd.c-1.51"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-bsd.c-1.52"; /* The version for this transport*/ #define MAX_SCG 32 /* Max # of SCSI controllers */ #define MAX_TGT 16 @@ -658,7 +658,7 @@ * * Copyright (c) 1998 Michael Smith * Copyright (c) 1998 Kenneth D. Merry - * Copyright (c) 1998-2009 Joerg Schilling + * Copyright (c) 1998-2011 Joerg Schilling * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -701,7 +701,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.51"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-bsd.c-1.52"; /* The version for this transport*/ #define CAM_MAXDEVS 128 struct scg_local { @@ -1101,6 +1101,7 @@ union ccb *ccb = &ccb_space; int rv, result; u_int32_t flags; + int sense_len; if (scgp->fd < 0) { #if 0 @@ -1140,7 +1141,14 @@ * the tag action valid field like this in scgo_send(): * * 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, @@ -1149,7 +1157,7 @@ /* 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); @@ -1207,12 +1215,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-3.00~trusty~mc3man1/libscg/scsihack.c cdrtools-3.01a26~trusty/libscg/scsihack.c --- cdrtools-3.00~trusty~mc3man1/libscg/scsihack.c 2009-07-13 19:19:47.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scsihack.c 2013-07-30 18:37:09.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsihack.c 1.55 09/07/13 Copyright 1997,2000-2009 J. Schilling */ +/* @(#)scsihack.c 1.60 13/07/30 Copyright 1997,2000-2013 J. Schilling */ #ifndef lint static char _sccsid[] = - "@(#)scsihack.c 1.55 09/07/13 Copyright 1997,2000-2009 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-2009 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 @@ -99,6 +101,8 @@ scgo_reset, }; +#ifndef NO_SCSI_IMPL + /*#undef sun*/ /*#undef __sun*/ /*#undef __sun__*/ @@ -124,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 */ @@ -225,7 +234,7 @@ #include "scsi-beos.c" #endif -#if defined(__CYGWIN32__) || defined(__MINGW32__) +#if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER) #define SCSI_IMPL /* Yep, we support WNT and W9? */ #include "scsi-wnt.c" #endif @@ -255,8 +264,8 @@ #include "scsi-atari.c" #endif -#ifdef __SYLLABLE__ /* We have a SCSI implementation for Syllable */ -#define SCSI_IMPL +#if defined(__SYLLABLE__) || defined(__PYRO__) +#define SCSI_IMPL /* We have a SCSI implementation for Syllable and Pyro */ #include "scsi-syllable.c" #endif @@ -268,6 +277,7 @@ #include "scsi-new-arch.c" #endif +#endif /* !NO_SCSI_IMPL */ #ifndef SCSI_IMPL /* @@ -349,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.55"; /* 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-3.00~trusty~mc3man1/libscg/scsi-linux-ata.c cdrtools-3.01a26~trusty/libscg/scsi-linux-ata.c --- cdrtools-3.00~trusty~mc3man1/libscg/scsi-linux-ata.c 2009-09-07 19:09:48.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scsi-linux-ata.c 2013-05-28 18:19:31.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-linux-ata.c 1.15 09/09/07 Copyright 2002-2009 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.15 09/09/07 Copyright 2002-2009 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.15"; /* 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)); @@ -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-3.00~trusty~mc3man1/libscg/scsi-linux-pg.c cdrtools-3.01a26~trusty/libscg/scsi-linux-pg.c --- cdrtools-3.00~trusty~mc3man1/libscg/scsi-linux-pg.c 2006-11-26 17:12:57.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libscg/scsi-linux-sg.c cdrtools-3.01a26~trusty/libscg/scsi-linux-sg.c --- cdrtools-3.00~trusty~mc3man1/libscg/scsi-linux-sg.c 2010-05-24 14:00:54.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scsi-linux-sg.c 2013-05-28 18:19:16.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-linux-sg.c 1.95 10/05/24 Copyright 1997-2010 J. Schilling */ +/* @(#)scsi-linux-sg.c 1.96 13/05/28 Copyright 1997-2013 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-linux-sg.c 1.95 10/05/24 Copyright 1997-2010 J. Schilling"; + "@(#)scsi-linux-sg.c 1.96 13/05/28 Copyright 1997-2013 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-2010 J. Schilling + * Copyright (c) 1997-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -127,7 +127,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.95"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-linux-sg.c-1.96"; /* The version for this transport*/ #ifndef SCSI_IOCTL_GET_BUS_NUMBER #define SCSI_IOCTL_GET_BUS_NUMBER 0x5386 @@ -1395,8 +1395,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. */ diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scsi-sun.c cdrtools-3.01a26~trusty/libscg/scsi-sun.c --- cdrtools-3.00~trusty~mc3man1/libscg/scsi-sun.c 2008-03-27 18:56:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scsi-sun.c 2013-05-14 21:16:09.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-sun.c 1.89 08/03/27 Copyright 1988,1995,2000-2008 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.89 08/03/27 Copyright 1988,1995,2000-2008 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-2008 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.89"; /* The version for /dev/scg */ -LOCAL char _scg_utrans_version[] = "uscsi-1.89"; /* 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)); diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scsi-syllable.c cdrtools-3.01a26~trusty/libscg/scsi-syllable.c --- cdrtools-3.00~trusty~mc3man1/libscg/scsi-syllable.c 2009-02-01 14:30:18.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scsi-syllable.c 2012-12-02 22:09:06.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-syllable.c 1.1 09/02/01 Copyright 1998-2009 J. Schilling, 2005 Kristian Van Der Vliet */ +/* @(#)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.1 09/02/01 Copyright 1998-2009 J. Schilling, 2005 Kristian Van Der Vliet"; + "@(#)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. @@ -20,7 +20,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 1998-2009 J. Schilling + * Copyright (c) 1998-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -49,15 +49,20 @@ * 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.1"; /* The version for this transport */ +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 */ diff -Nru cdrtools-3.00~trusty~mc3man1/libscg/scsitransp.c cdrtools-3.01a26~trusty/libscg/scsitransp.c --- cdrtools-3.00~trusty~mc3man1/libscg/scsitransp.c 2009-09-07 19:09:48.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scsitransp.c 2013-05-28 18:18:53.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsitransp.c 1.98 09/09/07 Copyright 1988,1995,2000-2009 J. Schilling */ +/* @(#)scsitransp.c 1.99 13/05/28 Copyright 1988,1995,2000-2013 J. Schilling */ /*#ifndef lint*/ static char sccsid[] = - "@(#)scsitransp.c 1.98 09/09/07 Copyright 1988,1995,2000-2009 J. Schilling"; + "@(#)scsitransp.c 1.99 13/05/28 Copyright 1988,1995,2000-2013 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-2009 J. Schilling + * Copyright (c) 1988,1995,2000-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -415,17 +415,6 @@ scgp->running = FALSE; __scg_times(scgp); 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 +423,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-3.00~trusty~mc3man1/libscg/scsi-unixware.c cdrtools-3.01a26~trusty/libscg/scsi-unixware.c --- cdrtools-3.00~trusty~mc3man1/libscg/scsi-unixware.c 2006-11-26 17:12:58.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libscg/scsi-vms.c cdrtools-3.01a26~trusty/libscg/scsi-vms.c --- cdrtools-3.00~trusty~mc3man1/libscg/scsi-vms.c 2006-11-26 17:12:58.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scsi-vms.c 2011-03-07 22:19:21.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-vms.c 1.34 06/11/26 Copyright 1997 J. Schilling */ +/* @(#)scsi-vms.c 1.35 11/03/07 Copyright 1997 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-vms.c 1.34 06/11/26 Copyright 1997 J. Schilling"; + "@(#)scsi-vms.c 1.35 11/03/07 Copyright 1997 J. Schilling"; #endif /* * Interface for the VMS generic SCSI implementation. @@ -55,7 +55,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.35"; /* 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 */ @@ -556,6 +556,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 +565,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-3.00~trusty~mc3man1/libscg/scsi-wnt.c cdrtools-3.01a26~trusty/libscg/scsi-wnt.c --- cdrtools-3.00~trusty~mc3man1/libscg/scsi-wnt.c 2006-11-26 17:12:58.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscg/scsi-wnt.c 2013-07-30 18:37:09.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.50 13/07/30 Copyright 1998-2013 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.50 13/07/30 Copyright 1998-2013 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-2013 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.50"; /* The version for this transport*/ +LOCAL char _scg_itrans_version[] = "SPTI-scsi-wnt.c-1.50"; /* 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; } @@ -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-3.00~trusty~mc3man1/libscgcmd/libscgcmd-mapvers cdrtools-3.01a26~trusty/libscgcmd/libscgcmd-mapvers --- cdrtools-3.00~trusty~mc3man1/libscgcmd/libscgcmd-mapvers 2008-10-26 21:03:28.000000000 +0000 +++ cdrtools-3.01a26~trusty/libscgcmd/libscgcmd-mapvers 2010-10-02 20:08:40.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)libscgcmd-mapvers 1.1 08/10/26 Copyright 2008 J. Schilling +# /* @(#)libscgcmd-mapvers 1.2 10/10/02 Copyright 2008-2010 J. Schilling */ SCHILY_1.0 { diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/abspath.c cdrtools-3.01a26~trusty/libschily/abspath.c --- cdrtools-3.00~trusty~mc3man1/libschily/abspath.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/astoi.c cdrtools-3.01a26~trusty/libschily/astoi.c --- cdrtools-3.00~trusty~mc3man1/libschily/astoi.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/astoi.c 2010-08-21 11:39:07.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)astoi.c 1.9 06/09/13 Copyright 1985, 1995-2003 J. Schilling */ +/* @(#)astoi.c 1.10 10/08/21 Copyright 1985, 1995-2010 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-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -44,7 +44,7 @@ long l; (void) astol(s, &l); - return ((int) l); + return ((int)l); } EXPORT long diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/at-base2.c cdrtools-3.01a26~trusty/libschily/at-base2.c --- cdrtools-3.00~trusty~mc3man1/libschily/at-base2.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/at-base.c cdrtools-3.01a26~trusty/libschily/at-base.c --- cdrtools-3.00~trusty~mc3man1/libschily/at-base.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/at-defs.h cdrtools-3.01a26~trusty/libschily/at-defs.h --- cdrtools-3.00~trusty~mc3man1/libschily/at-defs.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/chown.c cdrtools-3.01a26~trusty/libschily/chown.c --- cdrtools-3.00~trusty~mc3man1/libschily/chown.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/cmpbytes.c cdrtools-3.01a26~trusty/libschily/cmpbytes.c --- cdrtools-3.00~trusty~mc3man1/libschily/cmpbytes.c 2010-05-24 09:45:28.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/cmpbytes.c 2010-08-21 10:04:02.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)cmpbytes.c 1.22 10/05/24 Copyright 1988, 1995-2010 J. Schilling */ +/* @(#)cmpbytes.c 1.23 10/08/21 Copyright 1988, 1995-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)cmpbytes.c 1.22 10/05/24 Copyright 1988, 1995-2010 J. Schilling"; + "@(#)cmpbytes.c 1.23 10/08/21 Copyright 1988, 1995-2010 J. Schilling"; #endif /* lint */ /* * compare data @@ -68,10 +68,12 @@ n /= (8 * sizeof (long)); do { + /* BEGIN CSTYLED */ DO8( if (*tol++ != *froml++) break; ); + /* END CSTYLED */ } while (--n > 0); if (n > 0) { @@ -89,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; } diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/cmpmbytes.c cdrtools-3.01a26~trusty/libschily/cmpmbytes.c --- cdrtools-3.00~trusty~mc3man1/libschily/cmpmbytes.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/cmpnullbytes.c cdrtools-3.01a26~trusty/libschily/cmpnullbytes.c --- cdrtools-3.00~trusty~mc3man1/libschily/cmpnullbytes.c 2010-05-24 09:45:28.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/cmpnullbytes.c 2010-08-21 10:04:02.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)cmpnullbytes.c 1.9 10/05/24 Copyright 1988,2002-2010 J. Schilling */ +/* @(#)cmpnullbytes.c 1.10 10/08/21 Copyright 1988,2002-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)cmpnullbytes.c 1.9 10/05/24 Copyright 1988,2002-2010 J. Schilling"; + "@(#)cmpnullbytes.c 1.10 10/08/21 Copyright 1988,2002-2010 J. Schilling"; #endif /* lint */ /* * compare data against null @@ -62,10 +62,12 @@ n /= (8 * sizeof (long)); do { + /* BEGIN CSTYLED */ DO8( if (*froml++ != 0) break; ); + /* END CSTYLED */ } while (--n > 0); if (n > 0) { @@ -80,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; } diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/comerr.c cdrtools-3.01a26~trusty/libschily/comerr.c --- cdrtools-3.00~trusty~mc3man1/libschily/comerr.c 2009-07-10 19:54:04.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/comerr.c 2013-12-31 14:09:01.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)comerr.c 1.35 09/07/10 Copyright 1985-1989, 1995-2009 J. Schilling */ +/* @(#)comerr.c 1.41 13/12/31 Copyright 1985-1989, 1995-2013 J. Schilling */ /* * Routines for printing command errors * - * Copyright (c) 1985-1989, 1995-2009 J. Schilling + * Copyright (c) 1985-1989, 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. @@ -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)); @@ -79,7 +85,31 @@ #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); +} + +/* 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); } @@ -103,7 +133,32 @@ #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); +} + +/* 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); } @@ -127,7 +182,7 @@ #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); } @@ -152,7 +207,7 @@ #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); } @@ -178,9 +233,10 @@ #define silent_error(e) ((e) < 0) #endif EXPORT int -_comerr(f, exflg, err, msg, args) +_comerr(f, exflg, exc, err, msg, args) FILE *f; int exflg; + int exc; int err; const char *msg; va_list args; @@ -201,12 +257,49 @@ 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. + */ + if (exc != exmod && exmod <= 0 && exmod >= EX_CLASH) + exc = EX_CLASH; + return (exc); +} + EXPORT void comexit(err) int err; diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/dirent.c cdrtools-3.01a26~trusty/libschily/dirent.c --- cdrtools-3.00~trusty~mc3man1/libschily/dirent.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/dirent.c 2012-03-20 22:28:05.000000000 +0000 @@ -0,0 +1,157 @@ +/* @(#)dirent.c 1.3 12/03/20 Copyright 2011 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)dirent.c 1.3 12/03/20 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. + */ + +#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_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-3.00~trusty~mc3man1/libschily/diropen.c cdrtools-3.01a26~trusty/libschily/diropen.c --- cdrtools-3.00~trusty~mc3man1/libschily/diropen.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/dlfcn.c cdrtools-3.01a26~trusty/libschily/dlfcn.c --- cdrtools-3.00~trusty~mc3man1/libschily/dlfcn.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/eaccess.c cdrtools-3.01a26~trusty/libschily/eaccess.c --- cdrtools-3.00~trusty~mc3man1/libschily/eaccess.c 2010-05-08 11:48:17.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/eaccess.c 2014-05-15 20:11:04.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)eaccess.c 1.4 10/05/08 Copyright 2004-2010 J. Schilling */ +/* @(#)eaccess.c 1.6 14/05/15 Copyright 2004-2014 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)eaccess.c 1.4 10/05/08 Copyright 2004-2010 J. Schilling"; + "@(#)eaccess.c 1.6 14/05/15 Copyright 2004-2014 J. Schilling"; #endif /* * Implement the best possible emulation for eaccess() * - * Copyright 2004-2010 J. Schilling + * Copyright 2004-2014 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -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. @@ -23,6 +25,7 @@ #include #include +#include #include #ifndef HAVE_EACCESS @@ -39,7 +42,14 @@ #ifdef HAVE_ACCESS_E_OK return (access(name, E_OK|mode)); #else - return (access(name, mode)); + if (getuid() == geteuid() && getgid() == getegid()) + return (access(name, mode)); +#ifdef EOPNOTSUPP + seterrno(EOPNOTSUPP); +#else + seterrno(EINVAL); +#endif + return (-1); #endif #endif } diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/faccessat.c cdrtools-3.01a26~trusty/libschily/faccessat.c --- cdrtools-3.00~trusty~mc3man1/libschily/faccessat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/fchdir.c cdrtools-3.01a26~trusty/libschily/fchdir.c --- cdrtools-3.00~trusty~mc3man1/libschily/fchdir.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/fchmodat.c cdrtools-3.01a26~trusty/libschily/fchmodat.c --- cdrtools-3.00~trusty~mc3man1/libschily/fchmodat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/fchownat.c cdrtools-3.01a26~trusty/libschily/fchownat.c --- cdrtools-3.00~trusty~mc3man1/libschily/fchownat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/fcomerr.c cdrtools-3.01a26~trusty/libschily/fcomerr.c --- cdrtools-3.00~trusty~mc3man1/libschily/fcomerr.c 2009-07-10 19:54:04.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/fcomerr.c 2013-12-31 14:09:01.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)fcomerr.c 1.2 09/07/10 Copyright 1985-1989, 1995-2007 J. Schilling */ +/* @(#)fcomerr.c 1.5 13/12/31 Copyright 1985-1989, 1995-2013 J. Schilling */ /* * Routines for printing command errors on a specified FILE * * - * Copyright (c) 1985-1989, 1995-2007 J. Schilling + * Copyright (c) 1985-1989, 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. @@ -27,10 +29,11 @@ #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));*/ /* VARARGS1 */ #ifdef PROTOTYPES @@ -51,7 +54,32 @@ #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); +} + +/* 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); } @@ -76,7 +104,33 @@ #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); +} + +/* 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); } @@ -101,7 +155,7 @@ #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); } @@ -127,7 +181,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-3.00~trusty~mc3man1/libschily/fconv.c cdrtools-3.01a26~trusty/libschily/fconv.c --- cdrtools-3.00~trusty~mc3man1/libschily/fconv.c 2010-05-24 09:47:49.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/fconv.c 2010-11-06 19:41:10.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)fconv.c 1.42 10/05/24 Copyright 1985, 1995-2010 J. Schilling */ +/* @(#)fconv.c 1.45 10/11/06 Copyright 1985, 1995-2010 J. Schilling */ /* * Convert floating point numbers to strings for format.c * Should rather use the MT-safe routines [efg]convert() @@ -20,11 +20,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 *)); @@ -70,7 +72,6 @@ #endif #if !defined(isinf) && defined(FINITE) #define isinf !FINITE -/*#define isinf IS_INF*/ #define FOUND_ISINF #endif #if defined(FOUND_ISNAN) && defined(FOUND_ISINF) @@ -78,7 +79,8 @@ #endif #endif -#if defined(HAVE_IEEEFP_H) && !defined(FOUND_ISXX) && !defined(FOUND_C99_ISXX) +#if defined(HAVE_IEEEFP_H) && !defined(FOUND_ISXX) && \ + !defined(FOUND_C99_ISXX) /* * SVR4 */ @@ -171,13 +173,13 @@ * local names instead. */ #ifndef HAVE_ECVT -# define ecvt js_ecvt +#define ecvt js_ecvt #endif #ifndef HAVE_FCVT -# define fcvt js_fcvt +#define fcvt js_fcvt #endif #ifndef HAVE_GCVT -# define gcvt js_gcvt +#define gcvt js_gcvt #endif #endif @@ -188,16 +190,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; { @@ -208,8 +219,10 @@ int decpt; int sign; +#ifndef __DO_LONG_DOUBLE__ if ((len = _ferr(s, val)) > 0) return (len); +#endif rs = s; #ifdef V7_FLOATSTYLE b = ecvt(val, ndigits, &decpt, &sign); @@ -218,6 +231,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++; @@ -230,12 +250,22 @@ 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'; *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 @@ -259,7 +289,7 @@ EXPORT int ftofs(s, val, fieldwidth, ndigits) register char *s; - double val; + MDOUBLE val; register int fieldwidth; register int ndigits; { @@ -270,8 +300,10 @@ int decpt; int sign; +#ifndef __DO_LONG_DOUBLE__ if ((len = _ferr(s, val)) > 0) return (len); +#endif rs = s; #ifdef USE_ECVT /* @@ -287,6 +319,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) @@ -312,7 +351,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) @@ -328,6 +371,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; @@ -347,4 +412,5 @@ } return (0); } +#endif /* __DO_LONG_DOUBLE__ */ #endif /* NO_FLOATINGPOINT */ diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/fdopendir.c cdrtools-3.01a26~trusty/libschily/fdopendir.c --- cdrtools-3.00~trusty~mc3man1/libschily/fdopendir.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/fexec.c cdrtools-3.01a26~trusty/libschily/fexec.c --- cdrtools-3.00~trusty~mc3man1/libschily/fexec.c 2009-11-15 14:14:28.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/fexec.c 2013-01-27 18:25:28.000000000 +0000 @@ -1,8 +1,13 @@ -/* @(#)fexec.c 1.42 09/11/15 Copyright 1985, 1995-2009 J. Schilling */ +/* @(#)fexec.c 1.49 13/01/27 Copyright 1985, 1995-2013 J. Schilling */ /* * Execute a program with stdio redirection * - * Copyright (c) 1985, 1995-2009 J. Schilling + * Copyright (c) 1985, 1995-2013 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 @@ -16,6 +21,13 @@ * 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 @@ -30,15 +42,84 @@ #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 +#ifndef __DO__FEXEC__ +#ifndef NO_FEXEC_COMPAT /* Define to disable backward compatibility */ +#undef fexecl +#undef fexecle +#undef fexecv +#undef fexecve +#ifdef HAVE_PRAGMA_WEAK +#pragma weak fexecl = js_fexecl +#pragma weak fexecle = js_fexecle +#pragma weak fexecv = js_fexecv +#pragma weak fexecve = js_fexecve +#else + +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 */ +#endif /* NO_FEXEC_COMPAT */ + + #ifdef JOS #define enofile(t) ((t) == EMISSDIR || \ (t) == ENOFILE || \ @@ -51,17 +132,6 @@ (t) == EIO) #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 - #ifndef set_child_standard_fds LOCAL void fdcopy __PR((int, int)); LOCAL void fdmove __PR((int, int)); @@ -72,20 +142,22 @@ #ifdef F_GETFD #define fd_getfd(fd) fcntl((fd), F_GETFD, 0) #else -#define fd_getfd(fd) +#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) +#define fd_setfd(fd, val) (0) #endif +#endif /* __DO__FEXEC__ */ #ifdef PROTOTYPES EXPORT int -fexecl(const char *name, FILE *in, FILE *out, FILE *err, const char *arg0, ...) +js_fexecl(const char *name, FILE *in, FILE *out, FILE *err, const char *arg0, + ...) #else EXPORT int -fexecl(name, in, out, err, arg0, va_alist) +js_fexecl(name, in, out, err, arg0, va_alist) char *name; FILE *in; FILE *out; @@ -135,7 +207,7 @@ } 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); @@ -143,10 +215,11 @@ #ifdef PROTOTYPES EXPORT int -fexecle(const char *name, FILE *in, FILE *out, FILE *err, const char *arg0, ...) +js_fexecle(const char *name, FILE *in, FILE *out, FILE *err, const char *arg0, + ...) #else EXPORT int -fexecle(name, in, out, err, arg0, va_alist) +js_fexecle(name, in, out, err, arg0, va_alist) char *name; FILE *in; FILE *out; @@ -198,25 +271,30 @@ } 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[]; @@ -299,19 +377,19 @@ if (fin != STDIN_FILENO) { f[0] = fd_getfd(STDIN_FILENO); o[0] = dup(STDIN_FILENO); - fd_setfd(o[0], 1); + fd_setfd(o[0], FD_CLOEXEC); fdmove(fin, STDIN_FILENO); } if (fout != STDOUT_FILENO) { f[1] = fd_getfd(STDOUT_FILENO); o[1] = dup(STDOUT_FILENO); - fd_setfd(o[1], 1); + fd_setfd(o[1], FD_CLOEXEC); fdmove(fout, STDOUT_FILENO); } if (ferr != STDERR_FILENO) { f[2] = fd_getfd(STDERR_FILENO); o[2] = dup(STDERR_FILENO); - fd_setfd(o[2], 1); + fd_setfd(o[2], FD_CLOEXEC); fdmove(ferr, STDERR_FILENO); } #endif @@ -426,12 +504,9 @@ #endif #endif -/*---------------------------------------------------------------------------- -| -| get PATH from env -| -+----------------------------------------------------------------------------*/ - +/* + * get PATH from env + */ LOCAL const char * getpath(env) char * const *env; @@ -450,13 +525,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; @@ -472,5 +544,6 @@ ev++; } } +#endif /* __DO__FEXEC__ */ #endif /* defined(HAVE_DUP) && (defined(HAVE_DUP2) || defined(F_DUPFD)) */ diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/fillbytes.c cdrtools-3.01a26~trusty/libschily/fillbytes.c --- cdrtools-3.00~trusty~mc3man1/libschily/fillbytes.c 2009-10-17 20:14:16.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/fillbytes.c 2010-08-21 11:39:07.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)fillbytes.c 1.17 09/10/17 Copyright 1987, 1995-2009 J. Schilling */ +/* @(#)fillbytes.c 1.18 10/08/21 Copyright 1987, 1995-2010 J. Schilling */ /* * fill memory with data * - * Copyright (c) 1987, 1995-2009 J. Schilling + * Copyright (c) 1987, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -23,7 +23,7 @@ #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) diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/findbytes.c cdrtools-3.01a26~trusty/libschily/findbytes.c --- cdrtools-3.00~trusty~mc3man1/libschily/findbytes.c 2009-10-17 20:14:16.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/findbytes.c 2010-08-23 13:38:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)findbytes.c 1.6 09/10/17 Copyright 2000-2009 J. Schilling */ +/* @(#)findbytes.c 1.7 10/08/23 Copyright 2000-2009 J. Schilling */ /* * Find a byte with specific value in memory. * @@ -97,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 @@ -112,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-3.00~trusty~mc3man1/libschily/findinpath.c cdrtools-3.01a26~trusty/libschily/findinpath.c --- cdrtools-3.00~trusty~mc3man1/libschily/findinpath.c 2009-07-08 21:56:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/findinpath.c 2010-10-06 22:11:30.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)findinpath.c 1.5 09/07/08 Copyright 2004-2009 J. Schilling */ +/* @(#)findinpath.c 1.6 10/10/07 Copyright 2004-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)findinpath.c 1.5 09/07/08 Copyright 2004-2009 J. Schilling"; + "@(#)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-2009 J. Schilling + * Copyright 2004-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -28,7 +28,8 @@ #include #include -EXPORT char *findinpath __PR((char *name, int mode, BOOL plain_file)); +EXPORT char *findinpath __PR((char *name, int mode, BOOL plain_file, + char *path)); #ifdef JOS #define enofile(t) ((t) == EMISSDIR || \ @@ -43,10 +44,11 @@ #endif EXPORT char * -findinpath(name, mode, plain_file) +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; @@ -61,7 +63,9 @@ if (strchr(name, '/')) return (strdup(name)); - if ((pathlist = getenv("PATH")) == NULL) + if (path != NULL) + pathlist = path; + else if ((pathlist = getenv("PATH")) == NULL) pathlist = "/bin"; p2 = pathlist = strdup(pathlist); if (pathlist == NULL) diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/fnmatch.c cdrtools-3.01a26~trusty/libschily/fnmatch.c --- cdrtools-3.00~trusty~mc3man1/libschily/fnmatch.c 2010-05-08 15:19:03.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/fnmatch.c 2013-04-25 21:07:48.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)fnmatch.c 8.15 10/05/08 2005-2010 J. Schilling from 8.2 (Berkeley) */ +/* @(#)fnmatch.c 8.18 13/04/25 2005-2013 J. Schilling from 8.2 (Berkeley) */ #include #ifndef lint static UConst char sccsid[] = - "@(#)fnmatch.c 8.15 10/05/08 2005-2010 J. Schilling from 8.2 (Berkeley)"; + "@(#)fnmatch.c 8.18 13/04/25 2005-2013 J. Schilling from 8.2 (Berkeley)"; #endif /* * Copyright (c) 1989, 1993, 1994 @@ -37,9 +37,9 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static UConst char sccsid[] = "@(#)fnmatch.c 8.15 (Berkeley) 05/08/10"; +static UConst char sccsid[] = "@(#)fnmatch.c 8.18 (Berkeley) 04/25/13"; #endif /* LIBC_SCCS and not lint */ -/*__FBSDID("$FreeBSD: src/lib/libc/gen/fnmatch.c,v 1.19 2010/04/16 22:29:24 jilles Exp $");*/ +/* "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. @@ -58,12 +58,12 @@ */ #include -#if !defined(HAVE_FNMATCH) || !defined(HAVE_FNMATCH_IGNORECASE) #include #include #include #include #include +#include /* Define missing prototypes */ #define EOS '\0' @@ -75,12 +75,28 @@ static int fnmatch1 __PR((const char *, const char *, const char *, int, mbstate_t, mbstate_t)); +#ifndef HAVE_FNMATCH +#undef fnmatch +#ifdef HAVE_PRAGMA_WEAK +#pragma weak fnmatch = js_fnmatch +#else int fnmatch(pattern, string, flags) const char *pattern; const char *string; int flags; { + 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; @@ -315,4 +331,3 @@ *newp = (char *)pattern; return (ok == negate ? RANGE_NOMATCH : RANGE_MATCH); } -#endif /* !defined(HAVE_FNMATCH) || !defined(HAVE_FNMATCH_IGNORECASE) */ diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/format.c cdrtools-3.01a26~trusty/libschily/format.c --- cdrtools-3.00~trusty~mc3man1/libschily/format.c 2010-05-24 09:49:48.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/format.c 2014-03-31 17:50:25.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)format.c 1.49 10/05/24 Copyright 1985-2010 J. Schilling */ +/* @(#)format.c 1.58 14/03/31 Copyright 1985-2014 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-2010 J. Schilling + * Copyright (c) 1985-2014 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,38 @@ #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 @@ -117,6 +151,11 @@ #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 *)); @@ -137,20 +176,41 @@ 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 + +#ifndef FORMAT_FUNC_NAME +#define FORMAT_FUNC_NAME format +#define FORMAT_FUNC_PARM + +#define FORMAT_FUNC_PROTO_DECL void (*fun)(char, long), +#define FORMAT_FUNC_KR_DECL register void (*fun)(); +#define FORMAT_FUNC_KR_ARGS fun, + +#define ofun(c, fp) (*fun)(c, fp) +#endif #ifdef PROTOTYPES EXPORT int -format(void (*fun)(char, long), +FORMAT_FUNC_NAME(FORMAT_FUNC_PROTO_DECL long farg, const char *fmt, - va_list args) + va_list oargs) #else EXPORT int -format(fun, farg, fmt, args) - register void (*fun)(); +FORMAT_FUNC_NAME(FORMAT_FUNC_KR_ARGS farg, fmt, oargs) + FORMAT_FUNC_KR_DECL register long farg; register char *fmt; - va_list args; + va_list oargs; #endif { #ifdef FORMAT_LOW_MEM @@ -165,6 +225,7 @@ register char mode; register char c; int count; + int num; int i; short sh; const char *str; @@ -175,10 +236,25 @@ 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_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. @@ -188,7 +264,7 @@ while (c != '%') { if (c == '\0') return (count); - (*fun)(c, farg); + ofun(c, farg); c = *(++fmt); count++; } @@ -209,18 +285,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. @@ -229,47 +315,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: @@ -298,15 +466,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 == 'f' || + mode == 'g')) + goto checkfmt; fmt--; mode = 'D'; /* default mode */ } } - } else switch (*fmt) { + } else { + checkfmt: + switch (*fmt) { case 'h': if (!type) @@ -365,7 +543,10 @@ */ getmode: - if (!strchr("udioxX", *(++fmt))) { + if (!strchr("udioxXn", *(++fmt))) { + /* + * %hhd -> char in decimal + */ if (type == 'H' && *fmt == 'h') { type = 'C'; goto getmode; @@ -378,13 +559,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; @@ -411,10 +594,11 @@ 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'; @@ -445,6 +629,19 @@ case 'e': if (fa.signific == -1) fa.signific = 6; + 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, fa.signific); + count += prbuf(buf, &fa); + continue; +#else + dval = ldval; +#endif +#endif + } dval = va_arg(args, double); ftoes(buf, dval, 0, fa.signific); count += prbuf(buf, &fa); @@ -452,6 +649,19 @@ case 'f': if (fa.signific == -1) fa.signific = 6; + 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, fa.signific); + count += prbuf(buf, &fa); + continue; +#else + dval = ldval; +#endif +#endif + } dval = va_arg(args, double); ftofs(buf, dval, 0, fa.signific); count += prbuf(buf, &fa); @@ -461,6 +671,23 @@ 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); + count += prbuf(buf, &fa); + continue; +#else + dval = ldval; +#endif +#endif + } dval = va_arg(args, double); (void) gcvt(dval, fa.signific, buf); count += prbuf(buf, &fa); @@ -492,31 +719,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 @@ -886,7 +1146,9 @@ register int diff; register int rfillc; register long arg = fa->farg; +#ifdef FORMAT_FUNC_PARM register void (*fun) __PR((char, long)) = fa->outf; +#endif register int count; register int lzero = 0; @@ -904,28 +1166,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); } @@ -950,7 +1212,9 @@ register int diff; register int rfillc; register long arg = fa->farg; +#ifdef FORMAT_FUNC_PARM register void (*fun) __PR((char, long)) = fa->outf; +#endif register int count; count = 1; @@ -961,13 +1225,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); } @@ -1012,3 +1276,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-3.00~trusty~mc3man1/libschily/fprformat.c cdrtools-3.01a26~trusty/libschily/fprformat.c --- cdrtools-3.00~trusty~mc3man1/libschily/fprformat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/fprformat.c 2014-01-05 12:25:14.000000000 +0000 @@ -0,0 +1,54 @@ +/* @(#)fprformat.c 1.3 14/01/05 Copyright 2013-2014 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-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 +#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 + +#include "format.c" diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/fstatat.c cdrtools-3.01a26~trusty/libschily/fstatat.c --- cdrtools-3.00~trusty~mc3man1/libschily/fstatat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/fstream.c cdrtools-3.01a26~trusty/libschily/fstream.c --- cdrtools-3.00~trusty~mc3man1/libschily/fstream.c 2009-07-08 21:56:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/fstream.c 2014-04-14 18:51:03.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)fstream.c 1.26 09/07/08 Copyright 1985-2009 J. Schilling */ +/* @(#)fstream.c 1.31 14/04/14 Copyright 1985-2014 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)fstream.c 1.26 09/07/08 Copyright 1985-2009 J. Schilling"; + "@(#)fstream.c 1.31 14/04/14 Copyright 1985-2014 J. Schilling"; #endif /* * Stream filter module * - * Copyright (c) 1985-2009 J. Schilling + * Copyright (c) 1985-2014 J. Schilling * * Exported functions: * mkfstream(f, fun, rfun, efun) Construct new fstream @@ -24,6 +24,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. @@ -37,16 +39,23 @@ #include #include -EXPORT fstream *mkfstream __PR((FILE * f, fstr_fun sfun, fstr_rfun rfun, fstr_efun efun)); +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)); +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 * */ @@ -64,11 +73,63 @@ 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; @@ -78,6 +139,9 @@ free((char *)fsp); } +/* + * Change the FILE * member of the stream. + */ EXPORT FILE * fssetfile(fsp, f) register fstream *fsp; @@ -89,19 +153,36 @@ 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 */ + /* + * We have a filter function, so call it. + */ if ((*fsp->fstr_func)(fsp, fsp->fstr_file) == EOF) return (EOF); } 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("character from file at %06x\n", fsp->fstr_file); + printf("read character from file at %06x\n", fsp->fstr_file); #endif if (fsp->fstr_rfunc != (fstr_rfun)0) return ((*fsp->fstr_rfunc)(fsp)); @@ -114,6 +195,9 @@ return (*fsp->fstr_bp++); /* char from buffer */ } +/* + * Push a null terminated string on the stream + */ EXPORT void fspushstr(fsp, ss) register fstream *fsp; @@ -124,9 +208,14 @@ 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); -/* len = strlen(fsp->fstr_bp) + strlen(ss);*/ if (len > STR_SBUF_SIZE) { /* realloc !!! */ if ((ts = (CHAR *)malloc(sizeof (*ts)*(len+1))) == NULL) raisecond("fspushstr", (long)NULL); @@ -159,6 +248,9 @@ } } +/* + * Push a character on the stream + */ EXPORT void fspushcha(fsp, c) fstream *fsp; @@ -185,7 +277,6 @@ s_ccpy(ts, ss) register CHAR *ts; register unsigned char *ss; -/* register char *ss;*/ { while (*ss) *ts++ = *ss++; @@ -210,7 +301,6 @@ s_ccat(ts, ss) register string ts; register unsigned char *ss; -/* register char *ss;*/ { while (*ts) ts++; diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/futimens.c cdrtools-3.01a26~trusty/libschily/futimens.c --- cdrtools-3.00~trusty~mc3man1/libschily/futimens.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/futimesat.c cdrtools-3.01a26~trusty/libschily/futimesat.c --- cdrtools-3.00~trusty~mc3man1/libschily/futimesat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/getargs.c cdrtools-3.01a26~trusty/libschily/getargs.c --- cdrtools-3.00~trusty~mc3man1/libschily/getargs.c 2009-11-28 21:15:56.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/getargs.c 2014-01-19 16:21:32.000000000 +0000 @@ -1,12 +1,12 @@ -/* @(#)getargs.c 2.62 09/11/28 Copyright 1985, 1988, 1994-2009 J. Schilling */ +/* @(#)getargs.c 2.66 14/01/19 Copyright 1985, 1988, 1994-2014 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)getargs.c 2.62 09/11/28 Copyright 1985, 1988, 1994-2009 J. Schilling"; + "@(#)getargs.c 2.66 14/01/19 Copyright 1985, 1988, 1994-2014 J. Schilling"; #endif #define NEW /* - * Copyright (c) 1985, 1988, 1994-2009 J. Schilling + * Copyright (c) 1985, 1988, 1994-2014 J. Schilling * * 1.3.88 Start implementation of release 2 */ @@ -24,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. @@ -52,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. @@ -101,7 +100,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 *)); @@ -128,11 +129,9 @@ return (0); } -/*--------------------------------------------------------------------------- -| -| get flags until a non flag type argument is reached (old version) -| -+---------------------------------------------------------------------------*/ +/* + * get flags until a non flag type argument is reached (old version) + */ /* VARARGS3 */ #ifdef PROTOTYPES EXPORT int @@ -160,11 +159,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 @@ -193,11 +190,9 @@ } -/*--------------------------------------------------------------------------- -| -| 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) int *pac; @@ -209,11 +204,9 @@ } -/*--------------------------------------------------------------------------- -| -| 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 @@ -244,11 +237,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 @@ -282,11 +273,9 @@ } -/*--------------------------------------------------------------------------- -| -| 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) int *pac; @@ -306,12 +295,10 @@ } -/*--------------------------------------------------------------------------- -| -| 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; @@ -322,12 +309,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; @@ -339,12 +324,10 @@ } -/*--------------------------------------------------------------------------- -| -| 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) int *pac; @@ -356,21 +339,20 @@ } -/*--------------------------------------------------------------------------- -| -| 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; @@ -406,11 +388,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; @@ -471,17 +451,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; @@ -565,7 +543,8 @@ */ again: if (fmt[0] != '\0' && - (fmt[1] == ',' || fmt[1] == '+' || fmt[1] == '\0')) + (fmt[1] == ',' || fmt[1] == '+' || + fmt[1] == '~' || fmt[1] == '%' || fmt[1] == '\0')) singlecharflag++; /* * check the whole format string for a match @@ -709,12 +688,14 @@ } } if (singlecharflag && !doubledash && - (val = dosflags(sargp, vfmt, flags & ~SETARGS, + (val = dosflags(sargp, vfmt, pac, pav, + flags & ~SETARGS, va_dummy)) == BADFLAG) { return (val); } if (singlecharflag && !doubledash && - (val = dosflags(sargp, vfmt, flags, + (val = dosflags(sargp, vfmt, pac, pav, + flags, oargs)) != BADFLAG) { return (val); } @@ -982,6 +963,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 +981,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,12 +1036,17 @@ 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) { curarg = va_arg(args, void *); } + for (i = 0; i < sizeof (fl); i++) { + fl[i] = 0; + } while (*p) { for (i = 0; i < nsf; i++) { if (rsf[i].c == *p) @@ -1064,26 +1056,53 @@ 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') && + (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] == '+') { + rsf[i].fmt = '+'; + 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++; + 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') { @@ -1103,6 +1122,19 @@ */ rsf[i].type = fmt[1]; } + } else if (fmt[1] == '~') { + /* + * Let fmt point to ',' to + * prevent to fetch the + * func arg twice. + */ + fmt += 2; + rsf[i].fmt = '~'; + rsf[i].type = '~'; + rsf[i].curfun = curarg; + rsf[i].curfun = (void *)curfun; + if ((flags & (SETARGS|ARGVECTOR)) == SETARGS) + curarg = va_arg(args, void *); } else { /* * ',' or '\0' for BOOL @@ -1131,29 +1163,66 @@ 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) && + (rsf[i].curfun || rsf[i].curarg)) { 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 + *((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 + *((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 + *((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 + *((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 + *((char *)rsf[i].curarg) = rsf[i].val; + } else if (type == '~') { + 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) ("", + rsf[i].curarg, + pac, pav, cfmt)); + return (ret); } else { return (BADFLAG); } @@ -1162,13 +1231,11 @@ 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 +1253,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; diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/getdomainname.c cdrtools-3.01a26~trusty/libschily/getdomainname.c --- cdrtools-3.00~trusty~mc3man1/libschily/getdomainname.c 2009-08-04 18:05:25.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/getdomainname.c 2010-08-23 12:49:33.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)getdomainname.c 1.22 09/08/04 Copyright 1995-2009 J. Schilling */ +/* @(#)getdomainname.c 1.23 10/08/23 Copyright 1995-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)getdomainname.c 1.22 09/08/04 Copyright 1995-2009 J. Schilling"; + "@(#)getdomainname.c 1.23 10/08/23 Copyright 1995-2010 J. Schilling"; #endif /* - * Copyright (c) 1995-2009 J. Schilling + * Copyright (c) 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -29,9 +29,6 @@ #endif -/*#undef HAVE_GETDOMAINNAME*/ -/*#undef SI_SRPC_DOMAIN*/ - #if !defined(HAVE_GETDOMAINNAME) && defined(SI_SRPC_DOMAIN) #define FUNC_GETDOMAINNAME diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/getdtablesize.c cdrtools-3.01a26~trusty/libschily/getdtablesize.c --- cdrtools-3.00~trusty~mc3man1/libschily/getdtablesize.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/geterrno.c cdrtools-3.01a26~trusty/libschily/geterrno.c --- cdrtools-3.00~trusty~mc3man1/libschily/geterrno.c 2009-07-26 18:18:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/geterrno.c 2010-08-23 12:43:25.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)geterrno.c 1.12 09/07/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,8 +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-3.00~trusty~mc3man1/libschily/getexecpath.c cdrtools-3.01a26~trusty/libschily/getexecpath.c --- cdrtools-3.00~trusty~mc3man1/libschily/getexecpath.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/getgrent.c cdrtools-3.01a26~trusty/libschily/getgrent.c --- cdrtools-3.00~trusty~mc3man1/libschily/getgrent.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/gethostname.c cdrtools-3.01a26~trusty/libschily/gethostname.c --- cdrtools-3.00~trusty~mc3man1/libschily/gethostname.c 2009-08-04 18:05:25.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/gethostname.c 2011-08-04 18:19:49.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)gethostname.c 1.20 09/08/04 Copyright 1995-2009 J. Schilling */ +/* @(#)gethostname.c 1.21 11/08/04 Copyright 1995-2011 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)gethostname.c 1.20 09/08/04 Copyright 1995-2009 J. Schilling"; + "@(#)gethostname.c 1.21 11/08/04 Copyright 1995-2011 J. Schilling"; #endif /* - * Copyright (c) 1995-2009 J. Schilling + * Copyright (c) 1995-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -39,7 +39,7 @@ return (-1); return (0); } -#else +#else /* ! SI_HOSTNAME */ #ifdef HAVE_UNAME #include @@ -58,6 +58,48 @@ 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 @@ -67,7 +109,11 @@ int namelen; { if (namelen < 0) { +#ifdef ENOSYS + seterrno(ENOSYS); +#else seterrno(EINVAL); +#endif return (-1); } if (namelen > 0) @@ -75,7 +121,8 @@ return (0); } #endif +#endif /* !HAVE_UNAME */ -#endif +#endif /* !SI_HOSTNAME */ #endif /* HAVE_GETHOSTNAME */ diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/getlogin.c cdrtools-3.01a26~trusty/libschily/getlogin.c --- cdrtools-3.00~trusty~mc3man1/libschily/getlogin.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/getnstimeofday.c cdrtools-3.01a26~trusty/libschily/getnstimeofday.c --- cdrtools-3.00~trusty~mc3man1/libschily/getnstimeofday.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/getperm.c cdrtools-3.01a26~trusty/libschily/getperm.c --- cdrtools-3.00~trusty~mc3man1/libschily/getperm.c 2009-07-08 21:56:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/getperm.c 2012-04-15 10:41:05.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)getperm.c 1.4 09/07/08 Copyright 2004-2009 J. Schilling */ +/* @(#)getperm.c 1.5 12/04/15 Copyright 2004-2009 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)getperm.c 1.4 09/07/08 Copyright 2004-2009 J. Schilling"; + "@(#)getperm.c 1.5 12/04/15 Copyright 2004-2009 J. Schilling"; #endif /* * Parser for chmod(1)/find(1)-perm, .... @@ -30,7 +30,7 @@ #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 isX)); +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)); @@ -119,9 +119,6 @@ *modep = OSMODE(mm); return (0); } - flag &= ~GP_FPERM; - if (flag & GP_XERR) - flag = -1; p = getsperm(f, p, modep, smode, flag); if (p && *p != '\0') { if (f) { @@ -144,12 +141,12 @@ } LOCAL char * -getsperm(f, p, mp, smode, isX) +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 isX; /* -1: Ignore X, 0: no dir/X 1: X OK */ + int flag; /* Flags, see getperm() flag defs */ { #ifdef OLD mode_t permval = 0; /* POSIX start value for "find" */ @@ -172,11 +169,15 @@ who |= m; } if (who == 0) { - mode_t mask = umask(0); + mode_t mask; - umask(mask); - who = ~mask; - who &= (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO); + 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); @@ -197,8 +198,11 @@ return (p); } + flag &= ~(GP_FPERM|GP_UMASK); + if (flag & GP_XERR) + flag = -1; perms = 0; - while ((pm = isperm(*p, isX)) != (mode_t)-1) { + while ((pm = isperm(*p, flag)) != (mode_t)-1) { p++; perms |= pm; } diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/getpwent.c cdrtools-3.01a26~trusty/libschily/getpwent.c --- cdrtools-3.00~trusty~mc3man1/libschily/getpwent.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/gettimeofday.c cdrtools-3.01a26~trusty/libschily/gettimeofday.c --- cdrtools-3.00~trusty~mc3man1/libschily/gettimeofday.c 2010-05-24 09:50:57.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/gettimeofday.c 2012-11-29 21:59:41.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)gettimeofday.c 1.4 10/05/24 Copyright 2007-2010 J. Schilling */ +/* @(#)gettimeofday.c 1.9 12/11/29 Copyright 2007-2012 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)gettimeofday.c 1.4 10/05/24 Copyright 2007-2010 J. Schilling"; + "@(#)gettimeofday.c 1.9 12/11/29 Copyright 2007-2012 J. Schilling"; #endif /* * Emulate gettimeofday where it does not exist * - * Copyright (c) 2007-2010 J. Schilling + * Copyright (c) 2007-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -21,20 +21,28 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#if !defined(HAVE_GETTIMEOFDAY) && defined(_MSC_VER) -#include +#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; + void *dummy; /* tzp is unspecified by POSIX */ { FILETIME ft; - __int64 T; + Int64_t T; if (tp == 0) return (0); @@ -44,9 +52,38 @@ T <<= 32; T += ft.dwLowDateTime; - tp->tv_sec = T / MS_FTIME_SECS - MS_FTIME_ADD; - tp->tv_usec = (T % MS_FTIME_SECS) / 10); + /* + * 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-3.00~trusty~mc3man1/libschily/gid.c cdrtools-3.01a26~trusty/libschily/gid.c --- cdrtools-3.00~trusty~mc3man1/libschily/gid.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/jsprintf.c cdrtools-3.01a26~trusty/libschily/jsprintf.c --- cdrtools-3.00~trusty~mc3man1/libschily/jsprintf.c 2009-06-30 18:32:14.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/jsprintf.c 2014-01-03 10:37:07.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)jsprintf.c 1.17 09/06/30 Copyright 1985, 1995-2009 J. Schilling */ +/* @(#)jsprintf.c 1.18 14/01/03 Copyright 1985, 1995-2014 J. Schilling */ /* - * Copyright (c) 1985, 1995-2009 J. Schilling + * Copyright (c) 1985, 1995-2014 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. @@ -21,6 +23,79 @@ #include #include +#if defined(__SVR4) && defined(__sun) +#ifndef USE_FPRFORMAT +#define USE_FPRFORMAT +#endif +#endif + +#ifdef NO_FPRFORMAT +#undef 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((long)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((long)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 { @@ -124,3 +199,4 @@ _bflush(&bb); return (bb.count); } +#endif diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/jssprintf.c cdrtools-3.01a26~trusty/libschily/jssprintf.c --- cdrtools-3.00~trusty~mc3man1/libschily/jssprintf.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/jssprintf.c 2010-08-21 11:39:07.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)jssprintf.c 1.16 06/09/13 Copyright 1985, 1995-2003 J. Schilling */ +/* @(#)jssprintf.c 1.17 10/08/21 Copyright 1985, 1995-2010 J. Schilling */ /* - * 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 @@ -32,7 +32,7 @@ long ba; #endif { - *(*(char **) ba)++ = c; + *(*(char **)ba)++ = c; } /* VARARGS2 */ diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/kill.c cdrtools-3.01a26~trusty/libschily/kill.c --- cdrtools-3.00~trusty~mc3man1/libschily/kill.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/lchmod.c cdrtools-3.01a26~trusty/libschily/lchmod.c --- cdrtools-3.00~trusty~mc3man1/libschily/lchmod.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/libschily-mapvers cdrtools-3.01a26~trusty/libschily/libschily-mapvers --- cdrtools-3.00~trusty~mc3man1/libschily/libschily-mapvers 2009-06-06 11:58:46.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/libschily-mapvers 2014-06-03 18:34:16.000000000 +0000 @@ -1,4 +1,209 @@ -# @(#)libschily-mapvers 1.15 09/06/06 Copyright 2005-2006 J. Schilling +# /* @(#)libschily-mapvers 1.46 14/06/03 Copyright 2005-2014 J. Schilling */ +#include + +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: @@ -6,32 +211,70 @@ patwmatch; patwlmatch; -# wcscat; +#ifndef HAVE_STRNDUP + strndup; +#endif +#ifndef HAVE_WCSCAT + wcscat; +#endif + wcscatl; -# wcschr; -# wcscmp; -# wcscpy; + +#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; -# wcslen; -# wcsncat; -# wcsncmp; -# wcsncpy; -# wcsrchr; +#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 - findinpath; - getperm; mkfstream; @@ -58,9 +301,12 @@ getvfiles; getargerror; -# fnmatch; -# strlcpy; -# strncpy; +#ifndef HAVE_STRLCPY + strlcpy; +#endif +#ifndef HAVE_STRNCPY + strncpy; +#endif js_malloc; js_realloc; @@ -117,13 +363,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; @@ -151,9 +401,11 @@ flush; format; fpipe; +#ifndef NO_FSPAWN_COMPAT fspawnl; fspawnv; fspawnv_nowait; +#endif ftoes; ftofs; get_progname; @@ -166,7 +418,9 @@ geterrno; getfiles; getfp; +#ifndef NO_GETLINE_COMPAT getline; +#endif getmainfp; getstr; handlecond; @@ -194,25 +448,49 @@ seterrno; setfp; starthandlecond; -# strcat; +#ifndef HAVE_STRCAT + strcat; +#endif + strcatl; -# strchr; -# strcmp; -# strcpy; -# strdup; + +#ifndef HAVE_STRCHR + strchr; +#endif +#ifndef HAVE_STRCMP + strcmp; +#endif +#ifndef HAVE_STRCPY + strcpy; +#endif +#ifndef HAVE_STRDUP + strdup; +#endif + streql; -# strlen; -# strncat; -# strncmp; -# strrchr; + +#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-3.00~trusty~mc3man1/libschily/libschily.mk cdrtools-3.01a26~trusty/libschily/libschily.mk --- cdrtools-3.00~trusty~mc3man1/libschily/libschily.mk 2007-07-01 09:38:54.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/libschily.mk 2013-10-30 22:37:07.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libschily.mk 1.5 07/07/01 +#ident @(#)libschily.mk 1.7 13/10/30 ########################################################################### SRCROOT= .. RULESDIR= RULES diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/linkat.c cdrtools-3.01a26~trusty/libschily/linkat.c --- cdrtools-3.00~trusty~mc3man1/libschily/linkat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/linkat.c 2013-10-30 22:54:18.000000000 +0000 @@ -0,0 +1,70 @@ +/* @(#)linkat.c 1.2 13/10/30 Copyright 2011-2013 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) 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_LINKAT + +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)]; + + buf[0] = '\0'; + if (resolvepath(old, buf, sizeof (buf)) < 0) + return (-1); + 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-3.00~trusty~mc3man1/libschily/lutimens.c cdrtools-3.01a26~trusty/libschily/lutimens.c --- cdrtools-3.00~trusty~mc3man1/libschily/lutimens.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/lxchdir.c cdrtools-3.01a26~trusty/libschily/lxchdir.c --- cdrtools-3.00~trusty~mc3man1/libschily/lxchdir.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/match.c cdrtools-3.01a26~trusty/libschily/match.c --- cdrtools-3.00~trusty~mc3man1/libschily/match.c 2009-05-30 20:00:50.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/match.c 2010-08-21 11:22:16.000000000 +0000 @@ -1,10 +1,10 @@ -/* @(#)match.c 1.23 09/05/30 Copyright 1985, 1995-2009 J. Schilling */ +/* @(#)match.c 1.24 10/08/21 Copyright 1985, 1995-2010 J. Schilling */ #include #include /* * Pattern matching functions * - * Copyright (c) 1985, 1995-2009 J. Schilling + * Copyright (c) 1985, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -62,11 +62,9 @@ #define ENDSTATE (-1) -/*--------------------------------------------------------------------------- -| -| The Interpreter -| -+---------------------------------------------------------------------------*/ +/* + * The Interpreter + */ /* @@ -290,11 +288,9 @@ #ifndef __LINE_MATCH -/*--------------------------------------------------------------------------- -| -| The Compiler -| -+---------------------------------------------------------------------------*/ +/* + * The Compiler + */ typedef struct args { const CHAR *pattern; diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/mkdirat.c cdrtools-3.01a26~trusty/libschily/mkdirat.c --- cdrtools-3.00~trusty~mc3man1/libschily/mkdirat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/mkdirs.c cdrtools-3.01a26~trusty/libschily/mkdirs.c --- cdrtools-3.00~trusty~mc3man1/libschily/mkdirs.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/mkfifoat.c cdrtools-3.01a26~trusty/libschily/mkfifoat.c --- cdrtools-3.00~trusty~mc3man1/libschily/mkfifoat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/mkfifo.c cdrtools-3.01a26~trusty/libschily/mkfifo.c --- cdrtools-3.00~trusty~mc3man1/libschily/mkfifo.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/mkgmtime.c cdrtools-3.01a26~trusty/libschily/mkgmtime.c --- cdrtools-3.00~trusty~mc3man1/libschily/mkgmtime.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/mknodat.c cdrtools-3.01a26~trusty/libschily/mknodat.c --- cdrtools-3.00~trusty~mc3man1/libschily/mknodat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/mkstemp.c cdrtools-3.01a26~trusty/libschily/mkstemp.c --- cdrtools-3.00~trusty~mc3man1/libschily/mkstemp.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/openat.c cdrtools-3.01a26~trusty/libschily/openat.c --- cdrtools-3.00~trusty~mc3man1/libschily/openat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/permtostr.c cdrtools-3.01a26~trusty/libschily/permtostr.c --- cdrtools-3.00~trusty~mc3man1/libschily/permtostr.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/procnameat.c cdrtools-3.01a26~trusty/libschily/procnameat.c --- cdrtools-3.00~trusty~mc3man1/libschily/procnameat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/readlinkat.c cdrtools-3.01a26~trusty/libschily/readlinkat.c --- cdrtools-3.00~trusty~mc3man1/libschily/readlinkat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/renameat.c cdrtools-3.01a26~trusty/libschily/renameat.c --- cdrtools-3.00~trusty~mc3man1/libschily/renameat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/renameat.c 2013-10-30 22:35:25.000000000 +0000 @@ -0,0 +1,51 @@ +/* @(#)renameat.c 1.1 13/10/30 Copyright 2011-2013 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) 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_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-3.00~trusty~mc3man1/libschily/rename.c cdrtools-3.01a26~trusty/libschily/rename.c --- cdrtools-3.00~trusty~mc3man1/libschily/rename.c 2009-07-08 21:56:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/rename.c 2011-06-18 19:23:42.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)rename.c 1.10 09/07/08 Copyright 1998-2009 J. Schilling */ +/* @(#)rename.c 1.11 11/06/18 Copyright 1998-2011 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)rename.c 1.10 09/07/08 Copyright 1998-2009 J. Schilling"; + "@(#)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-2009 J. Schilling + * Copyright (c) 1998-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -27,6 +27,7 @@ #ifndef HAVE_RENAME #include /* XXX not OK but needed for js_xx() in schily/schily.h */ +#include #include #include #include @@ -60,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; @@ -82,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) { @@ -127,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-3.00~trusty~mc3man1/libschily/resolvepath.c cdrtools-3.01a26~trusty/libschily/resolvepath.c --- cdrtools-3.00~trusty~mc3man1/libschily/resolvepath.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/resolvepath.c 2013-10-29 22:17:57.000000000 +0000 @@ -0,0 +1,272 @@ +/* @(#)resolvepath.c 1.4 13/10/29 Copyright 2011-2013 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-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 + +#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 +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 + +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. + */ +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-3.00~trusty~mc3man1/libschily/saveargs.c cdrtools-3.01a26~trusty/libschily/saveargs.c --- cdrtools-3.00~trusty~mc3man1/libschily/saveargs.c 2006-10-05 15:56:51.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/savewd.c cdrtools-3.01a26~trusty/libschily/savewd.c --- cdrtools-3.00~trusty~mc3man1/libschily/savewd.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/searchinpath.c cdrtools-3.01a26~trusty/libschily/searchinpath.c --- cdrtools-3.00~trusty~mc3man1/libschily/searchinpath.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/searchinpath.c 2010-11-18 22:49:52.000000000 +0000 @@ -0,0 +1,232 @@ +/* @(#)searchinpath.c 1.3 10/11/18 Copyright 1999-2010 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)searchinpath.c 1.3 10/11/18 Copyright 1999-2010 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-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 /* 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(); +#else + char *pn = getexecpath(); +#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 (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) != 0, + 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) != 0, + 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 (np >= &nbuf[4] && streql(&np[-4], "/bin")) + np = &np[-4]; + *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-3.00~trusty~mc3man1/libschily/seterrno.c cdrtools-3.01a26~trusty/libschily/seterrno.c --- cdrtools-3.00~trusty~mc3man1/libschily/seterrno.c 2009-07-26 18:18:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/seterrno.c 2010-08-23 12:43:25.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)seterrno.c 1.11 09/07/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,8 +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-3.00~trusty~mc3man1/libschily/setnstimeofday.c cdrtools-3.01a26~trusty/libschily/setnstimeofday.c --- cdrtools-3.00~trusty~mc3man1/libschily/setnstimeofday.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/shlschily.mk cdrtools-3.01a26~trusty/libschily/shlschily.mk --- cdrtools-3.00~trusty~mc3man1/libschily/shlschily.mk 2007-07-01 09:38:54.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/sleep.c cdrtools-3.01a26~trusty/libschily/sleep.c --- cdrtools-3.00~trusty~mc3man1/libschily/sleep.c 2009-07-08 21:56:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/sleep.c 2014-03-03 22:42:42.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)sleep.c 1.3 09/07/08 Copyright 2007-2009 J. Schilling */ +/* @(#)sleep.c 1.6 14/03/03 Copyright 2007-2014 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)sleep.c 1.3 09/07/08 Copyright 2007-2009 J. Schilling"; + "@(#)sleep.c 1.6 14/03/03 Copyright 2007-2014 J. Schilling"; #endif /* * Emulate sleep where it does not exist * - * Copyright (c) 2007-2009 J. Schilling + * Copyright (c) 2007-2014 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -16,13 +16,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. */ -#if !defined(HAVE_SLEEP) && defined(_MSC_VER) -#include +#if !defined(HAVE_SLEEP) && (defined(_MSC_VER) || defined(__MINGW32__)) +#include +#include EXPORT unsigned int sleep(secs) diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/spawn.c cdrtools-3.01a26~trusty/libschily/spawn.c --- cdrtools-3.00~trusty~mc3man1/libschily/spawn.c 2009-11-15 14:06:50.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/spawn.c 2010-10-21 17:13:01.000000000 +0000 @@ -1,8 +1,13 @@ -/* @(#)spawn.c 1.26 09/11/15 Copyright 1985, 1989, 1995-2009 J. Schilling */ +/* @(#)spawn.c 1.28 10/10/21 Copyright 1985, 1989, 1995-2010 J. Schilling */ /* * Spawn another process/ wait for child process * - * Copyright (c) 1985, 1989, 1995-2009 J. Schilling + * Copyright (c) 1985, 1989, 1995-2010 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 @@ -16,6 +21,11 @@ * 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 @@ -27,9 +37,25 @@ #include #define VMS_VFORK_OK #include +#endif /* __DO__FSPAWNL__ */ #define MAX_F_ARGS 16 +#ifndef __DO__FSPAWNL__ +#ifndef NO_FSPAWN_COMPAT /* Define to disable backward compatibility */ +#undef fspawnv +#undef fspawnl +#undef fspawnv_nowait +#ifdef HAVE_PRAGMA_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; @@ -38,21 +64,54 @@ 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 */ +#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, const char *arg0, ...) +js_fspawnl(FILE *in, FILE *out, FILE *err, const char *arg0, ...) #else EXPORT int -fspawnl(in, out, err, arg0, va_alist) +js_fspawnl(in, out, err, arg0, va_alist) FILE *in; FILE *out; FILE *err; @@ -101,14 +160,15 @@ } 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; @@ -158,3 +218,4 @@ return (WEXITSTATUS(status)); } +#endif /* __DO__FSPAWNL__ */ diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/sprintf.c cdrtools-3.01a26~trusty/libschily/sprintf.c --- cdrtools-3.00~trusty~mc3man1/libschily/sprintf.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/fcons64.c cdrtools-3.01a26~trusty/libschily/stdio/fcons64.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/fcons64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/fcons.c cdrtools-3.01a26~trusty/libschily/stdio/fcons.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/fcons.c 2007-04-03 16:38:03.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/fdup64.c cdrtools-3.01a26~trusty/libschily/stdio/fdup64.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/fdup64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/fdup.c cdrtools-3.01a26~trusty/libschily/stdio/fdup.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/fdup.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/fgetaline.c cdrtools-3.01a26~trusty/libschily/stdio/fgetaline.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/fgetaline.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/stdio/fgetaline.c 2014-03-27 21:29:03.000000000 +0000 @@ -0,0 +1,98 @@ +/* @(#)fgetaline.c 1.3 14/03/27 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 "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; +{ +#ifdef HAVE_GETDELIM + 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) { + line_size = DEF_LINE_SIZE; + 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-3.00~trusty~mc3man1/libschily/stdio/fgetline.c cdrtools-3.01a26~trusty/libschily/stdio/fgetline.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/fgetline.c 2004-09-25 12:23:36.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/stdio/fgetline.c 2014-03-27 21:29:03.000000000 +0000 @@ -1,6 +1,11 @@ -/* @(#)fgetline.c 1.8 04/09/25 Copyright 1986, 1996-2003 J. Schilling */ +/* @(#)fgetline.c 1.13 14/03/27 Copyright 1986, 1996-2014 J. Schilling */ /* - * Copyright (c) 1986, 1996-2003 J. Schilling + * Copyright (c) 1986, 1996-2014 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,20 +14,81 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/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__ + #include "schilyio.h" +#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 + /* * XXX should we check if HAVE_USG_STDIO is defined and * XXX use something line memccpy to speed things up ??? + * XXX On Solaris 64 bits, we may use #define FAST_GETC_PUTC + * XXX and getc_unlocked() */ +#if !defined(getc) && defined(USE_FGETS_FOR_FGETLINE) +#include EXPORT int -fgetline(f, buf, len) +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 +js_fgetline(f, buf, len) register FILE *f; char *buf; register int len; @@ -41,12 +107,14 @@ 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; } } @@ -59,11 +127,12 @@ 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-3.00~trusty~mc3man1/libschily/stdio/fgetstr.c cdrtools-3.01a26~trusty/libschily/stdio/fgetstr.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/fgetstr.c 2004-09-25 12:26:06.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/stdio/fgetstr.c 2014-03-27 21:29:03.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)fgetstr.c 1.9 04/09/25 Copyright 1986, 1996-2003 J. Schilling */ +/* @(#)fgetstr.c 1.11 14/03/27 Copyright 1986, 1996-2014 J. Schilling */ /* - * Copyright (c) 1986, 1996-2003 J. Schilling + * Copyright (c) 1986, 1996-2014 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. @@ -19,8 +21,30 @@ /* * XXX should we check if HAVE_USG_STDIO is defined and * XXX use something line memccpy to speed things up ??? + * XXX On Solaris 64 bits, we may use #define FAST_GETC_PUTC + * XXX and getc_unlocked() */ +#if !defined(getc) && defined(USE_FGETS_FOR_FGETSTR) +#include + +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) register FILE *f; @@ -51,6 +75,8 @@ return (bp - buf); } +#endif + EXPORT int getstr(buf, len) char *buf; diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/stdio/fileluopen64.c cdrtools-3.01a26~trusty/libschily/stdio/fileluopen64.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/fileluopen64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/fileluopen.c cdrtools-3.01a26~trusty/libschily/stdio/fileluopen.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/fileluopen.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/filemopen64.c cdrtools-3.01a26~trusty/libschily/stdio/filemopen64.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/filemopen64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/filemopen.c cdrtools-3.01a26~trusty/libschily/stdio/filemopen.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/filemopen.c 2005-08-18 10:14:22.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/fileopen64.c cdrtools-3.01a26~trusty/libschily/stdio/fileopen64.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/fileopen64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/fileopen.c cdrtools-3.01a26~trusty/libschily/stdio/fileopen.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/fileopen.c 2005-08-18 10:14:22.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/filepos64.c cdrtools-3.01a26~trusty/libschily/stdio/filepos64.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/filepos64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/filepos.c cdrtools-3.01a26~trusty/libschily/stdio/filepos.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/filepos.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/fileread.c cdrtools-3.01a26~trusty/libschily/stdio/fileread.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/fileread.c 2009-06-30 19:38:31.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/stdio/fileread.c 2012-02-26 14:19:42.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)fileread.c 1.16 09/06/30 Copyright 1986, 1995-2009 J. Schilling */ +/* @(#)fileread.c 1.17 12/02/26 Copyright 1986, 1995-2012 J. Schilling */ /* - * Copyright (c) 1986, 1995-2009 J. Schilling + * Copyright (c) 1986, 1995-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -59,7 +59,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); } @@ -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-3.00~trusty~mc3man1/libschily/stdio/filereopen.c cdrtools-3.01a26~trusty/libschily/stdio/filereopen.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/filereopen.c 2007-04-03 16:38:04.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/fileseek64.c cdrtools-3.01a26~trusty/libschily/stdio/fileseek64.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/fileseek64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/fileseek.c cdrtools-3.01a26~trusty/libschily/stdio/fileseek.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/fileseek.c 2007-04-03 16:38:04.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/filesize64.c cdrtools-3.01a26~trusty/libschily/stdio/filesize64.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/filesize64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/filestat64.c cdrtools-3.01a26~trusty/libschily/stdio/filestat64.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/filestat64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/filewrite.c cdrtools-3.01a26~trusty/libschily/stdio/filewrite.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/filewrite.c 2009-06-30 19:41:23.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/stdio/filewrite.c 2012-02-26 14:19:42.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)filewrite.c 1.17 09/06/30 Copyright 1986, 1995-2009 J. Schilling */ +/* @(#)filewrite.c 1.18 12/02/26 Copyright 1986, 1995-2012 J. Schilling */ /* - * Copyright (c) 1986, 1995-2009 J. Schilling + * Copyright (c) 1986, 1995-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -60,8 +60,8 @@ } 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); } @@ -84,8 +84,8 @@ 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-3.00~trusty~mc3man1/libschily/stdio/flag.c cdrtools-3.01a26~trusty/libschily/stdio/flag.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/flag.c 2007-04-03 16:38:04.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/openfd.c cdrtools-3.01a26~trusty/libschily/stdio/openfd.c --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/openfd.c 2006-11-28 16:46:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/stdio/schilyio.h cdrtools-3.01a26~trusty/libschily/stdio/schilyio.h --- cdrtools-3.00~trusty~mc3man1/libschily/stdio/schilyio.h 2009-06-30 19:37:32.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/stdio/schilyio.h 2010-08-23 19:57:34.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)schilyio.h 2.27 09/06/30 Copyright 1986, 1995-2009 J. Schilling */ +/* @(#)schilyio.h 2.28 10/08/23 Copyright 1986, 1995-2010 J. Schilling */ /* - * Copyright (c) 1986, 1995-2009 J. Schilling + * Copyright (c) 1986, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -32,7 +32,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 @@ -163,7 +162,6 @@ * Define prototypes to verify if our interface is right */ extern int __filbuf __PR((FILE *)); -/*extern int __flsbuf __PR(());*/ #else # ifdef HAVE__FILBUF # define usg_filbuf(fp) _filbuf(fp) @@ -172,7 +170,6 @@ * 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. @@ -187,7 +184,6 @@ * * Note that the interface is now checked by autoconf. */ -/*extern int _flsbuf __PR((int, FILE *));*/ #else /* * If we are on a non USG system we cannot down file pointers diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/strcasecmp.c cdrtools-3.01a26~trusty/libschily/strcasecmp.c --- cdrtools-3.00~trusty~mc3man1/libschily/strcasecmp.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/strcasemap.c cdrtools-3.01a26~trusty/libschily/strcasemap.c --- cdrtools-3.00~trusty~mc3man1/libschily/strcasemap.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/strcspn.c cdrtools-3.01a26~trusty/libschily/strcspn.c --- cdrtools-3.00~trusty~mc3man1/libschily/strcspn.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/strdup.c cdrtools-3.01a26~trusty/libschily/strdup.c --- cdrtools-3.00~trusty~mc3man1/libschily/strdup.c 2009-07-08 21:56:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/strdup.c 2010-08-21 11:39:07.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)strdup.c 1.5 09/07/08 Copyright 2003-2009 J. Schilling */ +/* @(#)strdup.c 1.6 10/08/21 Copyright 2003-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)strdup.c 1.5 09/07/08 Copyright 2003-2009 J. Schilling"; + "@(#)strdup.c 1.6 10/08/21 Copyright 2003-2010 J. Schilling"; #endif /* * strdup() to be used if missing in libc * - * Copyright (c) 2003-2009 J. Schilling + * Copyright (c) 2003-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -40,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-3.00~trusty~mc3man1/libschily/strncasecmp.c cdrtools-3.01a26~trusty/libschily/strncasecmp.c --- cdrtools-3.00~trusty~mc3man1/libschily/strncasecmp.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/strspn.c cdrtools-3.01a26~trusty/libschily/strspn.c --- cdrtools-3.00~trusty~mc3man1/libschily/strspn.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/strstr.c cdrtools-3.01a26~trusty/libschily/strstr.c --- cdrtools-3.00~trusty~mc3man1/libschily/strstr.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/strtod.c cdrtools-3.01a26~trusty/libschily/strtod.c --- cdrtools-3.00~trusty~mc3man1/libschily/strtod.c 2009-08-27 10:17:23.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/strtod.c 2010-08-20 22:11:59.000000000 +0000 @@ -1,6 +1,11 @@ -/* @(#)strtod.c 1.4 09/08/27 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 */ /**************************************************************** * diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/swabbytes.c cdrtools-3.01a26~trusty/libschily/swabbytes.c --- cdrtools-3.00~trusty~mc3man1/libschily/swabbytes.c 2009-10-17 19:56:10.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/swabbytes.c 2010-08-21 10:07:06.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)swabbytes.c 1.8 09/10/17 Copyright 1988, 1995-2009 J. Schilling */ +/* @(#)swabbytes.c 1.10 10/08/21 Copyright 1988, 1995-2010 J. Schilling */ /* * swab bytes in memory * - * Copyright (c) 1988, 1995-2009 J. Schilling + * Copyright (c) 1988, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -32,6 +32,7 @@ cnt /= 2; /* even count only */ while ((cnt -= 8) >= 0) { + /* CSTYLED */ DO8(c = *bp++; bp[-1] = *bp; *bp++ = c;); } cnt += 8; diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/symlinkat.c cdrtools-3.01a26~trusty/libschily/symlinkat.c --- cdrtools-3.00~trusty~mc3man1/libschily/symlinkat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/Targets cdrtools-3.01a26~trusty/libschily/Targets --- cdrtools-3.00~trusty~mc3man1/libschily/Targets 2010-05-08 11:47:22.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/Targets 2014-06-03 18:34:47.000000000 +0000 @@ -1,8 +1,8 @@ -# @(#)Targets 1.19 10/05/08 Copyright 1995 J. Schilling +# @(#)Targets 1.48 14/06/03 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 \ @@ -16,37 +16,63 @@ # Otherwise getfp.o would be made as dependency of avoffset # -CFILES_REST= astoi.c astoll.c astoull.c basename.c breakline.c \ - checkerr.c comerr.c fcomerr.c cmpbytes.c cmpnullbytes.c \ - dirname.c \ +CFILES_REST= abspath.c astoi.c astoll.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 \ - fconv.c fexec.c fillbytes.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 \ - fstream.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 \ - gettimeofday.c \ + getpwent.c \ + getnstimeofday.c gettimeofday.c \ + gid.c \ handlecond.c \ jsprintf.c jssnprintf.c jssprintf.c \ + kill.c \ + lchmod.c linkat.c lutimens.c \ + lxchdir.c \ match.c matchl.c matchw.c matchwl.c movebytes.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 \ - strcat.c strcatl.c strchr.c strcmp.c strcpy.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 strlcpy.c strncat.c strncmp.c \ - strncpy.c strndup.c strnlen.c strrchr.c \ + strncpy.c strndup.c strnlen.c strrchr.c strspn.c strstr.c \ swabbytes.c \ - usleep.c \ - wcscat.c wcscatl.c wcschr.c wcscmp.c wcscpy.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 wcslcpy.c wcsncat.c wcsncmp.c \ - wcsncpy.c wcsndup.c wcsnlen.c wcsrchr.c + wcsncpy.c wcsndup.c wcsnlen.c wcsrchr.c wcsspn.c wcsstr.c \ + wdabort.c \ + zerobytes.c # # These interfaces have been moved to libschilypr in order to make @@ -58,3 +84,5 @@ # that do not provide snprintf() CFILES= $(CFILES_STDIO) $(CFILES_REST) + +HFILES= at-defs.h diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/timegm.c cdrtools-3.01a26~trusty/libschily/timegm.c --- cdrtools-3.00~trusty~mc3man1/libschily/timegm.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/uid.c cdrtools-3.01a26~trusty/libschily/uid.c --- cdrtools-3.00~trusty~mc3man1/libschily/uid.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/uname.c cdrtools-3.01a26~trusty/libschily/uname.c --- cdrtools-3.00~trusty~mc3man1/libschily/uname.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/unlinkat.c cdrtools-3.01a26~trusty/libschily/unlinkat.c --- cdrtools-3.00~trusty~mc3man1/libschily/unlinkat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/usleep.c cdrtools-3.01a26~trusty/libschily/usleep.c --- cdrtools-3.00~trusty~mc3man1/libschily/usleep.c 2009-08-04 18:05:25.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/usleep.c 2014-03-03 22:42:42.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)usleep.c 1.22 09/08/04 Copyright 1995-2009 J. Schilling */ +/* @(#)usleep.c 1.24 14/03/03 Copyright 1995-2014 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)usleep.c 1.22 09/08/04 Copyright 1995-2009 J. Schilling"; + "@(#)usleep.c 1.24 14/03/03 Copyright 1995-20014 J. Schilling"; #endif /* - * Copyright (c) 1995-2009 J. Schilling + * Copyright (c) 1995-2014 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. @@ -118,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-3.00~trusty~mc3man1/libschily/utimensat.c cdrtools-3.01a26~trusty/libschily/utimensat.c --- cdrtools-3.00~trusty~mc3man1/libschily/utimensat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/utimens.c cdrtools-3.01a26~trusty/libschily/utimens.c --- cdrtools-3.00~trusty~mc3man1/libschily/utimens.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/wcscspn.c cdrtools-3.01a26~trusty/libschily/wcscspn.c --- cdrtools-3.00~trusty~mc3man1/libschily/wcscspn.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/wcsdup.c cdrtools-3.01a26~trusty/libschily/wcsdup.c --- cdrtools-3.00~trusty~mc3man1/libschily/wcsdup.c 2009-07-08 21:56:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/wcsdup.c 2010-08-21 11:39:07.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)wcsdup.c 1.6 09/07/08 Copyright 2003-2009 J. Schilling */ +/* @(#)wcsdup.c 1.7 10/08/21 Copyright 2003-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)wcsdup.c 1.6 09/07/08 Copyright 2003-2009 J. Schilling"; + "@(#)wcsdup.c 1.7 10/08/21 Copyright 2003-2010 J. Schilling"; #endif /* * wcsdup() to be used if missing in libc * - * Copyright (c) 2003-2009 J. Schilling + * Copyright (c) 2003-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -39,7 +39,7 @@ if (res == NULL) return (NULL); if (i > 16) { - movebytes(s, res, (int) (i * sizeof (wchar_t))); + movebytes(s, res, (int)(i * sizeof (wchar_t))); } else { wchar_t *s2 = res; diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/wcsndup.c cdrtools-3.01a26~trusty/libschily/wcsndup.c --- cdrtools-3.00~trusty~mc3man1/libschily/wcsndup.c 2010-05-03 22:37:55.000000000 +0000 +++ cdrtools-3.01a26~trusty/libschily/wcsndup.c 2010-07-21 21:00:55.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)wcsndup.c 1.1 10/05/04 Copyright 2003-2010 J. Schilling */ +/* @(#)wcsndup.c 1.2 10/07/21 Copyright 2003-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)wcsndup.c 1.1 10/05/04 Copyright 2003-2010 J. Schilling"; + "@(#)wcsndup.c 1.2 10/07/21 Copyright 2003-2010 J. Schilling"; #endif /* - * strndup() to be used if missing in libc + * wcsndup() to be used if missing in libc * * Copyright (c) 2003-2010 J. Schilling */ @@ -25,18 +25,19 @@ #include #include #include +#include #include #include -#ifndef HAVE_STRNDUP +#ifndef HAVE_WCSNDUP -EXPORT char * -strndup(s, len) - const char *s; +EXPORT wchar_t * +wcsndup(s, len) + const wchar_t *s; size_t len; { - size_t i = strnlen(s, len) + 1; - char *res = malloc(i); + size_t i = wcsnlen(s, len) + 1; + wchar_t *res = malloc(i); if (res == NULL) return (NULL); @@ -44,7 +45,7 @@ movebytes(s, res, --i); res[i] = '\0'; } else { - char *s2 = res; + wchar_t *s2 = res; while (--i > 0 && (*s2++ = *s++) != '\0') ; diff -Nru cdrtools-3.00~trusty~mc3man1/libschily/wcsspn.c cdrtools-3.01a26~trusty/libschily/wcsspn.c --- cdrtools-3.00~trusty~mc3man1/libschily/wcsspn.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/wcsstr.c cdrtools-3.01a26~trusty/libschily/wcsstr.c --- cdrtools-3.00~trusty~mc3man1/libschily/wcsstr.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/wdabort.c cdrtools-3.01a26~trusty/libschily/wdabort.c --- cdrtools-3.00~trusty~mc3man1/libschily/wdabort.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libschily/zerobytes.c cdrtools-3.01a26~trusty/libschily/zerobytes.c --- cdrtools-3.00~trusty~mc3man1/libschily/zerobytes.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libsiconv/libsiconv-mapvers cdrtools-3.01a26~trusty/libsiconv/libsiconv-mapvers --- cdrtools-3.00~trusty~mc3man1/libsiconv/libsiconv-mapvers 2007-05-19 12:25:39.000000000 +0000 +++ cdrtools-3.01a26~trusty/libsiconv/libsiconv-mapvers 2010-10-02 20:07:16.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)libsiconv-mapvers 1.1 07/05/19 Copyright 2007 J. Schilling +# /* @(#)libsiconv-mapvers 1.2 10/10/02 Copyright 2007-2010 J. Schilling */ SCHILY_1.0 { global: diff -Nru cdrtools-3.00~trusty~mc3man1/libsiconv/libsiconv.mk cdrtools-3.01a26~trusty/libsiconv/libsiconv.mk --- cdrtools-3.00~trusty~mc3man1/libsiconv/libsiconv.mk 2007-05-19 12:24:07.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/libsiconv/sic_nls.c cdrtools-3.01a26~trusty/libsiconv/sic_nls.c --- cdrtools-3.00~trusty~mc3man1/libsiconv/sic_nls.c 2010-05-24 09:34:41.000000000 +0000 +++ cdrtools-3.01a26~trusty/libsiconv/sic_nls.c 2014-01-15 21:54:49.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)sic_nls.c 1.16 10/05/24 Copyright 2007-2010 J. Schilling */ +/* @(#)sic_nls.c 1.18 14/01/15 Copyright 2007-2014 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)sic_nls.c 1.16 10/05/24 Copyright 2007-2010 J. Schilling"; + "@(#)sic_nls.c 1.18 14/01/15 Copyright 2007-2014 J. Schilling"; #endif /* * This code reads translation files in the format used by @@ -12,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-2010 J. Schilling + * Copyright 2007-2014 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 * * 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,7 @@ #include #include #include /* For strdup() */ +#include /* For R_OK */ #include #include #include @@ -67,10 +70,12 @@ #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 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)); @@ -175,6 +180,24 @@ } /* + * 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 int @@ -215,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); @@ -258,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() */ diff -Nru cdrtools-3.00~trusty~mc3man1/.links cdrtools-3.01a26~trusty/.links --- cdrtools-3.00~trusty~mc3man1/.links 2010-05-14 19:56:27.000000000 +0000 +++ cdrtools-3.01a26~trusty/.links 2014-09-30 13:00:37.000000000 +0000 @@ -14,12 +14,14 @@ ./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 @@ -32,6 +34,7 @@ ./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 @@ -73,21 +76,49 @@ ./RULES/alpha-netbsd-cc.rul ./RULES/alpha-netbsd-gcc.rul ./RULES/alphaserver_ds20_500_mhz-openvms-cc.rul +./RULES/amd64-freebsd-cc.rul +./RULES/amd64-freebsd-clang64.rul +./RULES/amd64-freebsd-clang32.rul +./RULES/amd64-freebsd-clang.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/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-sunpro32.rul +./RULES/cc-sunpro64.rul ./RULES/falcon-freemint-gcc.rul ./RULES/hades-freemint-gcc.rul ./RULES/i386-cygwin32_nt-cc.rul @@ -96,16 +127,26 @@ ./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-cc64.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 @@ -115,6 +156,12 @@ ./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-clang32.rul +./RULES/i586-linux-clang64.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 @@ -129,6 +176,8 @@ ./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 @@ -144,6 +193,12 @@ ./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 @@ -157,6 +212,7 @@ ./RULES/ip20-irix-cc64.rul ./RULES/ip20-irix-gcc.rul ./RULES/ip20-irix-gcc64.rul +./RULES/ip22-irix-cc64.rul ./RULES/ip27-irix-cc.rul ./RULES/ip27-irix-cc64.rul ./RULES/ip27-irix-gcc.rul @@ -210,16 +266,26 @@ ./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/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 @@ -241,6 +307,12 @@ ./RULES/sparc64-linux-cc.rul ./RULES/sparc64-linux-gcc.rul ./RULES/sparc64-linux-gcc32.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 @@ -267,13 +339,36 @@ ./RULES/sun4v-sunos5-cc64.rul ./RULES/sun4v-sunos5-gcc.rul ./RULES/sun4v-sunos5-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-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-suncc.rul ./RULES/x86_64-linux-suncc64.rul +./TEMPLATES/cmd.mk +./TEMPLATES/inc.mk +./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 diff -Nru cdrtools-3.00~trusty~mc3man1/Mcsw cdrtools-3.01a26~trusty/Mcsw --- cdrtools-3.00~trusty~mc3man1/Mcsw 2009-04-04 20:09:51.000000000 +0000 +++ cdrtools-3.01a26~trusty/Mcsw 2011-09-28 16:49:01.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Mcsw 1.3 09/04/04 +#ident @(#)Mcsw 1.4 11/09/28 ########################################################################### deftgt: SRCROOT= . @@ -14,13 +14,14 @@ 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 -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.* diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/apple.c cdrtools-3.01a26~trusty/mkisofs/apple.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/apple.c 2010-02-28 21:23:57.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/apple.c 2014-01-19 13:36:02.000000000 +0000 @@ -1,12 +1,12 @@ -/* @(#)apple.c 1.42 10/02/28 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson, Copyright 2000-2010 J. Schilling */ +/* @(#)apple.c 1.44 14/01/19 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson, Copyright 2000-2014 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)apple.c 1.42 10/02/28 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson, Copyright 2000-2010 J. Schilling"; + "@(#)apple.c 1.44 14/01/19 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson, Copyright 2000-2014 J. Schilling"; #endif /* * Copyright (c) 1997, 1998, 1999, 2000 James Pearson - * Copyright (c) 2000-2010 J. Schilling + * Copyright (c) 2000-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 as published by @@ -635,7 +635,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); @@ -691,7 +691,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); @@ -767,7 +767,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); @@ -871,7 +871,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) @@ -1072,7 +1072,7 @@ /* 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); @@ -1256,7 +1256,7 @@ /* 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); @@ -1391,7 +1391,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); } @@ -1711,7 +1711,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 +1805,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 +1846,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); @@ -2029,7 +2029,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 @@ -2627,21 +2627,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", (Llong)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", (Llong)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 +2749,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 +2788,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 +2805,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,7 +2818,7 @@ 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; } @@ -2855,7 +2855,7 @@ 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"); } } @@ -2987,9 +2987,9 @@ char *a; { if (a) - comerr("%s\n", a); + comerr("%s\n", _(a)); else - comerr("\n"); + comerr(_("\n")); } #ifndef APPLE_HFS_HYB diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/apple_driver.c cdrtools-3.01a26~trusty/mkisofs/apple_driver.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/apple_driver.c 2007-09-16 10:47:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/apple_driver.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)apple_driver.c 1.8 07/09/16 joerg */ +/* @(#)apple_driver.c 1.9 10/12/19 joerg */ #ifndef lint static char sccsid[] = - "@(#)apple_driver.c 1.8 07/09/16 joerg"; + "@(#)apple_driver.c 1.9 10/12/19 joerg"; #endif /* * apple_driver.c: extract Mac partition label, maps and boot driver @@ -25,6 +25,7 @@ * Apple Computer, Inc. Software License Agreements. * * James Pearson 17/5/98 + * Copyright (c) 1998-2010 J. Schilling */ #include @@ -66,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]; @@ -81,14 +85,33 @@ 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; @@ -96,22 +119,22 @@ 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(mac_part->pmMapBlkCnt); if (!have_boot && strncmp((char *)mac_part->pmPartType, pmPartType_2, 12) == 0) { 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; } @@ -121,30 +144,30 @@ 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(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(mac_part->pmMapBlkCnt); @@ -152,7 +175,7 @@ int start, num; - fprintf(stderr, "%s: extracting %s ", argv[0], mac_part->pmPartType); + 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); @@ -162,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, "."); @@ -179,7 +202,7 @@ } 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); diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/apple_driver.mk cdrtools-3.01a26~trusty/mkisofs/apple_driver.mk --- cdrtools-3.00~trusty~mc3man1/mkisofs/apple_driver.mk 2006-10-03 22:20:54.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/mkisofs/boot.c cdrtools-3.01a26~trusty/mkisofs/boot.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/boot.c 2009-11-25 17:46:55.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/boot.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,14 +1,14 @@ -/* @(#)boot.c 1.24 09/11/25 Copyright 1999-2009 J. Schilling */ +/* @(#)boot.c 1.25 10/12/19 Copyright 1999-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)boot.c 1.24 09/11/25 Copyright 1999-2009 J. Schilling"; + "@(#)boot.c 1.25 10/12/19 Copyright 1999-2010 J. Schilling"; #endif /* * Support for generic boot (sector 0..16) * and to boot Sun sparc and Sun x86 systems. * - * Copyright (c) 1999-2009 J. Schilling + * Copyright (c) 1999-2010 J. Schilling */ /* * This program is free software; you can redistribute it and/or modify @@ -142,14 +142,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 +167,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 +191,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 +199,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 +218,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); @@ -414,19 +414,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,7 +441,7 @@ 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); } @@ -464,10 +464,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); } @@ -515,7 +515,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 +533,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-3.00~trusty~mc3man1/mkisofs/defaults.h cdrtools-3.01a26~trusty/mkisofs/defaults.h --- cdrtools-3.00~trusty~mc3man1/mkisofs/defaults.h 2009-07-05 18:59:13.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/defaults.h 2013-02-13 23:00:35.000000000 +0000 @@ -1,18 +1,18 @@ -/* @(#)defaults.h 1.24 09/07/05 joerg */ +/* @(#)defaults.h 1.25 13/02/14 joerg */ /* * Header file defaults.h - assorted default values for character strings in * the volume descriptor. * - * Copyright (c) 1999-2009 J. Schilling + * Copyright (c) 1999-2013 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 diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/diag/dump.c cdrtools-3.01a26~trusty/mkisofs/diag/dump.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/diag/dump.c 2009-07-08 22:11:50.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/diag/dump.c 2012-12-02 20:55:23.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)dump.c 1.36 09/07/09 joerg */ +/* @(#)dump.c 1.39 12/12/02 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)dump.c 1.36 09/07/09 joerg"; + "@(#)dump.c 1.39 12/12/02 joerg"; #endif /* * File dump.c - dump a file/device both in hex and in ASCII. @@ -10,7 +10,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999-2009 J. Schilling + * Copyright (c) 1999-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 version 2 @@ -36,6 +36,7 @@ #include #include #include +#include #include "../scsi.h" #include "cdrdeflt.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,13 +90,17 @@ #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 - printf("Cannot put tty into normal mode\n"); + printf(_("Cannot put tty into normal mode\n")); exit(1); } } @@ -103,13 +111,17 @@ #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 - printf("Cannot put tty into raw mode\n"); + printf(_("Cannot put tty into raw mode\n")); exit(1); } } @@ -203,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); @@ -228,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-inore-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); } @@ -247,30 +260,53 @@ { 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 *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, + if (getallargs(&cac, &cav, opts, &help, &help, &prvers, &ignerr, &filename, &sdevname) < 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("devdump %s (%s-%s-%s) Copyright (C) 1993-1999 Eric Youngdale (C) 1999-2009 Jörg Schilling\n", + printf(_("devdump %s (%s-%s-%s) Copyright (C) 1993-1999 %s (C) 1999-2012 %s\n"), VERSION, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Eric Youngdale"), + _("Joerg Schilling")); exit(0); } cac = argc - 1; @@ -282,11 +318,11 @@ } } 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 && sdevname != NULL) { - errmsgno(EX_BAD, "Only one of -i or dev= allowed\n"); + errmsgno(EX_BAD, _("Only one of -i or dev= allowed\n")); usage(EX_BAD); } #ifdef USE_SCG @@ -294,7 +330,7 @@ cdr_defaults(&sdevname, NULL, NULL, NULL, NULL); #endif if (filename == NULL && sdevname == NULL) { - fprintf(stderr, "ISO-9660 image not specified\n"); + fprintf(stderr, _("ISO-9660 image not specified\n")); usage(EX_BAD); } @@ -310,7 +346,7 @@ #else } else { #endif - fprintf(stderr, "Cannot open '%s'\n", filename); + fprintf(stderr, _("Cannot open '%s'\n"), filename); exit(1); } @@ -324,24 +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 - printf("Stdin must be a tty\n"); + printf(_("Stdin must be a tty\n")); exit(1); } - 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); @@ -351,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); @@ -374,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-3.00~trusty~mc3man1/mkisofs/diag/dump.mk cdrtools-3.01a26~trusty/mkisofs/diag/dump.mk --- cdrtools-3.00~trusty~mc3man1/mkisofs/diag/dump.mk 2008-10-26 21:26:59.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/diag/dump.mk 2013-04-21 18:24:56.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)dump.mk 1.10 08/10/26 +#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 @@ -28,11 +28,16 @@ CPPOPTS += -I../../libscgcmd CPPOPTS += -I../../libcdrdeflt CPPOPTS += -DSCHILY_PRINT +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= dump.c \ scsi.c -LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -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= devdump_man.mk ########################################################################### diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/diag/isodebug.8 cdrtools-3.01a26~trusty/mkisofs/diag/isodebug.8 --- cdrtools-3.00~trusty~mc3man1/mkisofs/diag/isodebug.8 2010-01-29 22:45:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/diag/isodebug.8 2014-12-03 21:22:08.000000000 +0000 @@ -1,4 +1,4 @@ -.\" @(#)isodebug.8 1.3 10/01/29 Copyr 2006 J. Schilling +.\" @(#)isodebug.8 1.5 14/12/03 Copyr 2006-2012 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 "10/01/29" "J\*org Schilling" "Schily\'s USER COMMANDS" +.TH ISODEBUG 1L "14/12/03" "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,17 +80,18 @@ .PP Additional information can be found on: .br -http://cdrecord.berlios.de/private/cdrecord.html +http://cdrecord.org/private/cdrecord.html .PP If you have support questions, send them to: .PP .B -cdrecord-support@berlios.de +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 @@ -91,8 +100,8 @@ 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-3.00~trusty~mc3man1/mkisofs/diag/isodebug.c cdrtools-3.01a26~trusty/mkisofs/diag/isodebug.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/diag/isodebug.c 2010-05-24 10:05:36.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/diag/isodebug.c 2012-12-02 20:55:23.000000000 +0000 @@ -1,22 +1,25 @@ -/* @(#)isodebug.c 1.27 10/05/24 Copyright 1996-2010 J. Schilling */ +/* @(#)isodebug.c 1.29 12/12/02 Copyright 1996-2012 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)isodebug.c 1.27 10/05/24 Copyright 1996-2010 J. Schilling"; + "@(#)isodebug.c 1.29 12/12/02 Copyright 1996-2012 J. Schilling"; #endif /* - * Copyright (c) 1996-2010 J. Schilling + * Copyright (c) 1996-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. + * 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 @@ -29,6 +32,7 @@ #include #include #include +#include #include "../scsi.h" #include "cdrdeflt.h" @@ -106,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)); @@ -116,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-inore-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); } @@ -229,29 +235,51 @@ { 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 *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, + if (getallargs(&cac, &cav, opts, &help, &help, &prvers, &ignerr, &filename, &sdevname) < 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("isodebug %s (%s-%s-%s) Copyright (C) 1996-2010 Jörg Schilling\n", + printf(_("isodebug %s (%s-%s-%s) Copyright (C) 1996-2012 %s\n"), VERSION, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Joerg Schilling")); exit(0); } cac = argc - 1; @@ -263,11 +291,11 @@ } } 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 && sdevname != NULL) { - errmsgno(EX_BAD, "Only one of -i or dev= allowed\n"); + errmsgno(EX_BAD, _("Only one of -i or dev= allowed\n")); usage(EX_BAD); } #ifdef USE_SCG @@ -275,7 +303,7 @@ cdr_defaults(&sdevname, NULL, NULL, NULL, NULL); #endif if (filename == NULL && sdevname == NULL) { - errmsgno(EX_BAD, "ISO-9660 image not specified\n"); + errmsgno(EX_BAD, _("ISO-9660 image not specified\n")); usage(EX_BAD); } @@ -291,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; @@ -307,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-3.00~trusty~mc3man1/mkisofs/diag/isodebug.mk cdrtools-3.01a26~trusty/mkisofs/diag/isodebug.mk --- cdrtools-3.00~trusty~mc3man1/mkisofs/diag/isodebug.mk 2008-10-26 21:26:59.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/diag/isodebug.mk 2013-04-21 18:24:56.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)isodebug.mk 1.8 08/10/26 +#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 @@ -28,11 +28,16 @@ CPPOPTS += -I../../libscgcmd CPPOPTS += -I../../libcdrdeflt CPPOPTS += -DSCHILY_PRINT +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= isodebug.c \ scsi.c -LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -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= isodebug_man.mk ########################################################################### diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/diag/isodump.c cdrtools-3.01a26~trusty/mkisofs/diag/isodump.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/diag/isodump.c 2009-10-12 16:53:47.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/diag/isodump.c 2012-12-02 20:55:23.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)isodump.c 1.44 09/10/12 joerg */ +/* @(#)isodump.c 1.47 12/12/02 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)isodump.c 1.44 09/10/12 joerg"; + "@(#)isodump.c 1.47 12/12/02 joerg"; #endif /* * File isodump.c - dump iso9660 directory information. @@ -11,7 +11,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999-2009 J. Schilling + * Copyright (c) 1999-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 version 2 @@ -37,6 +37,7 @@ #include #include #include +#include #include "../iso9660.h" #include "../rock.h" @@ -70,6 +71,7 @@ #define infile in_image FILE *infile = NULL; +BOOL ignerr = FALSE; off_t file_addr; unsigned char buffer[2048]; unsigned char search[64]; @@ -135,9 +137,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() @@ -145,13 +149,17 @@ #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 - printf("Cannot put tty into normal mode\n"); + printf(_("Cannot put tty into normal mode\n")); exit(1); } } @@ -162,13 +170,17 @@ #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 - printf("Cannot put tty into raw mode\n"); + printf(_("Cannot put tty into raw mode\n")); exit(1); } } @@ -245,7 +257,7 @@ 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[0] == 'R' && pnt[1] == 'R') { printf("=%d", pnt[3]); /* RR version */ @@ -290,12 +302,12 @@ int lsrc = pnt[6] & 0xFF; /* Len src */ int xver = pnt[7] & 0xFF; /* X vers */ - printf("=[len_id=%d,len_des=%d,len_src=%d,ext_ver=%d,id=\"%.*s\"]", + 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 */ - printf("=[skip=%d]", pnt[6] & 0xFF); /* SUSP skip off */ + printf(_("=[skip=%d]"), pnt[6] & 0xFF); /* SUSP skip off */ } if (strncmp((char *)pnt, "ST", 2) == 0) { /* Terminate SUSP */ @@ -330,19 +342,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, "/"); @@ -373,7 +385,7 @@ if (ncount) printf("]"); if (!cont_flag && flag1 != -1 && flag1 != (flag2 & 0xFF)) { - printf("Flag %x != %x", flag1, flag2); + printf(_("Flag %x != %x"), flag1, flag2); goof++; } /* @@ -477,11 +489,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)); } @@ -504,15 +516,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-inore-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); } @@ -523,11 +536,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 *sdevname = NULL; +#if defined(USE_NLS) + char *dir; +#endif char c; int i; struct iso_primary_descriptor ipd; @@ -535,19 +551,39 @@ 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, + if (getallargs(&cac, &cav, opts, &help, &help, &prvers, &ignerr, &filename, &sdevname) < 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("isodump %s (%s-%s-%s) Copyright (C) 1993-1999 Eric Youngdale (C) 1999-2009 Jörg Schilling\n", + printf(_("isodump %s (%s-%s-%s) Copyright (C) 1993-1999 %s (C) 1999-2012 %s\n"), VERSION, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Eric Youngdale"), + _("Joerg Schilling")); exit(0); } cac = argc - 1; @@ -559,11 +595,11 @@ } } 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 && sdevname != NULL) { - errmsgno(EX_BAD, "Only one of -i or dev= allowed\n"); + errmsgno(EX_BAD, _("Only one of -i or dev= allowed\n")); usage(EX_BAD); } #ifdef USE_SCG @@ -571,7 +607,7 @@ cdr_defaults(&sdevname, NULL, NULL, NULL, NULL); #endif if (filename == NULL && sdevname == NULL) { - fprintf(stderr, "ISO-9660 image not specified\n"); + fprintf(stderr, _("ISO-9660 image not specified\n")); usage(EX_BAD); } @@ -587,7 +623,7 @@ #else } else { #endif - fprintf(stderr, "Cannot open '%s'\n", filename); + fprintf(stderr, _("Cannot open '%s'\n"), filename); exit(1); } @@ -612,24 +648,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 - printf("Stdin must be a tty\n"); + printf(_("Stdin must be a tty\n")); exit(1); } - 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); @@ -640,14 +683,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); @@ -663,7 +710,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-3.00~trusty~mc3man1/mkisofs/diag/isodump.mk cdrtools-3.01a26~trusty/mkisofs/diag/isodump.mk --- cdrtools-3.00~trusty~mc3man1/mkisofs/diag/isodump.mk 2008-10-26 21:26:59.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/diag/isodump.mk 2013-04-21 18:24:56.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)isodump.mk 1.10 08/10/26 +#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 @@ -28,11 +28,16 @@ CPPOPTS += -I../../libscgcmd CPPOPTS += -I../../libcdrdeflt CPPOPTS += -DSCHILY_PRINT +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= isodump.c \ scsi.c -LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -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= isodump_man.mk ########################################################################### diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/diag/isoinfo.8 cdrtools-3.01a26~trusty/mkisofs/diag/isoinfo.8 --- cdrtools-3.00~trusty~mc3man1/mkisofs/diag/isoinfo.8 2009-10-11 13:13:37.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/diag/isoinfo.8 2014-12-03 21:22:08.000000000 +0000 @@ -1,5 +1,5 @@ .\" -.\" @(#)isoinfo.8 1.10 09/10/11 joerg +.\" @(#)isoinfo.8 1.15 14/12/03 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 "09/10/11" "Version 3.0" +.TH ISOINFO 8 "14/12/03" "Version 3.0" .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 +.I options ] [ -.B \-J -] -[ -.B \-j -.I charset -] -[ -.B \-f -] +.B\-find [ -.B \-l -] -[ -.B \-p -] -[ -.B \-T -.I sector -] -[ -.B \-N -.I sector -] -[ -.B \-i -.I isoimage -] -[ -.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 @@ -201,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 @@ -215,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 @@ -228,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 @@ -251,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-3.00~trusty~mc3man1/mkisofs/diag/isoinfo.c cdrtools-3.01a26~trusty/mkisofs/diag/isoinfo.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/diag/isoinfo.c 2010-05-24 10:07:13.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/diag/isoinfo.c 2014-05-04 13:51:35.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)isoinfo.c 1.80 10/05/24 joerg */ +/* @(#)isoinfo.c 1.92 14/05/04 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)isoinfo.c 1.80 10/05/24 joerg"; + "@(#)isoinfo.c 1.92 14/05/04 joerg"; #endif /* * File isodump.c - dump iso9660 directory information. @@ -11,7 +11,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999-2010 J. Schilling + * Copyright (c) 1999-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 @@ -48,12 +48,16 @@ #include #include #include -#include +#include +#include #include -#include +#include +#include +#include #include #include #include +#include #include "../iso9660.h" #include "../rock.h" @@ -63,6 +67,10 @@ #include #include /* for setmode() prototype */ +#ifdef USE_FIND +#include +#include +#endif /* * Make sure we have a definition for this. If not, take a very conservative @@ -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,39 +124,61 @@ #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; -char er_id[256]; -int su_version = 0; -int rr_version = 0; -int aa_version = 0; -int ucs_level = 0; - -struct stat fstat_buf; -int found_rr; -char name_buf[256*3]; -char xname[8192]; -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 ucs_level = 0; +LOCAL BOOL iso9660_inodes = FALSE; + +#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]; /* * 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) @@ -174,11 +193,21 @@ 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 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 dump_stat __PR((struct iso_directory_record * idr, int extent)); -LOCAL void extract_file __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_dir __PR((char * rootname, int extent, int len)); LOCAL void usage __PR((int excode)); EXPORT int main __PR((int argc, char *argv[])); @@ -188,6 +217,18 @@ 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 + LOCAL int @@ -322,7 +363,7 @@ 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)); @@ -418,12 +459,13 @@ int slen; int xlen; int ncount; - int extent; + int cl_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; @@ -434,7 +476,7 @@ flag2 = 0; while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { - printf("**BAD RRVERSION (%d) in '%2.2s' field %2.2X %2.2X.\n", pnt[3], pnt, pnt[0], pnt[1]); + 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 ??? */ } @@ -447,12 +489,48 @@ 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) flag2 |= RR_FLAG_TF; /* Time stamp */ + 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 |= RR_FLAG_SP; /* SUSP record */ su_version = pnt[3] & 0xff; } - if (strncmp((char *)pnt, "AA", 2) == 0) { + if (strncmp((char *)pnt, "AA", 2) == 0) { /* Neither SUSP nor RR */ flag2 |= RR_FLAG_AA; /* Apple Signature record */ aa_version = pnt[3] & 0xff; } @@ -467,11 +545,17 @@ 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); @@ -492,8 +576,11 @@ break; } - if (strncmp((char *)pnt, "PL", 2) == 0 || strncmp((char *)pnt, "CL", 2) == 0) { - extent = isonum_733(pnt+4); + 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 */ @@ -519,19 +606,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] == 8) xname[0] = '\0'; @@ -626,20 +713,35 @@ int length; }; -struct todo *todo_idr = NULL; +LOCAL 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"}; -LOCAL 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) @@ -718,16 +820,146 @@ } outline[off] = 0; printf("%s %s %s\n", outline, name_buf, xname); + return (TRUE); } LOCAL void -extract_file(idr) - struct iso_directory_record *idr; +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) { + + default: + errmsgno(EX_BAD, + "Unsupported file type %0lo for '%s'.\n", + (unsigned long)fstat_buf.st_mode & S_IFMT, + fname); + return; + + + case S_IFDIR: + 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: + if (mknod(fname, fstat_buf.st_mode, fstat_buf.st_rdev) < 0) + errmsg("Cannot make block device '%s'.\n", fname); + goto setmode; +#endif +#ifdef S_IFCHR + case S_IFCHR: + if (mknod(fname, fstat_buf.st_mode, fstat_buf.st_rdev) < 0) + errmsg("Cannot make character device '%s'.\n", fname); + goto setmode; +#endif +#ifdef S_IFIFO + case S_IFIFO: + if (mkfifo(fname, fstat_buf.st_mode) < 0) + errmsg("Cannot make fifo '%s'.\n", fname); + goto setmode; +#endif +#ifdef S_IFSOCK + case S_IFSOCK: + if (mknod(fname, fstat_buf.st_mode, 0) < 0) + errmsg("Cannot make socket '%s'.\n", fname); + goto setmode; +#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_FCHMOD + fchmod(f, fstat_buf.st_mode); +#else + fchmodat(AT_FDCWD, fname, fstat_buf.st_mode, 0); +#endif +#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 + 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: + fchmodat(AT_FDCWD, fname, fstat_buf.st_mode, AT_SYMLINK_NOFOLLOW); + fchownat(AT_FDCWD, fname, fstat_buf.st_uid, fstat_buf.st_gid, 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[20480]; - setmode(fileno(stdout), O_BINARY); + if (f == STDOUT_FILENO) + setmode(fileno(stdout), O_BINARY); extent = isonum_733((unsigned char *)idr->extent); len = isonum_733((unsigned char *)idr->size); @@ -742,7 +974,8 @@ #endif len -= tlen; extent += ISO_BLOCKS(tlen); - write(STDOUT_FILENO, buff, tlen); + if (write(f, buff, tlen) != tlen) + errmsg("Write error on '%s'.\n", fname); } } @@ -752,18 +985,25 @@ int extent; int len; { - char testname[PATH_MAX+1]; struct todo *td; int i; struct iso_directory_record * idr; + struct iso_directory_record didr; + struct stat dstat; unsigned char uc; unsigned char flags = 0; Llong size = 0; int sextent = 0; + int rlen; + int blen; +static char *n = 0; +static int nlen = 0; - if (do_listing) - printf("\nDirectory listing of %s\n", rootname); + if (do_listing && (!do_find || !find_print)) + printf(_("\nDirectory listing of %s\n"), rootname); + + rlen = strlen(rootname); while (len > 0) { #ifdef USE_SCG @@ -847,7 +1087,6 @@ name_buf[j] = uc ? uc : '_'; } name_buf[j] = '\0'; -/* name_buf[idr->name_len[0]/2] = '\0';*/ } break; case 0: @@ -866,12 +1105,54 @@ } } memcpy(date_buf, idr->date, 9); + /* + * 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); + } if (use_rock) dump_rr(idr); + if (Xtract && + (idr->flags[0] & 2) != 0 && + idr->name_len[0] == 1 && + idr->name[0] == 0) { + /* + * The '.' entry. + */ + didr = *idr; + dstat = fstat_buf; + } + 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 && (idr->name_len[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; @@ -892,25 +1173,49 @@ strcat(td->name, name_buf); strcat(td->name, "/"); } 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 { + 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) && @@ -918,7 +1223,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; } @@ -930,31 +1235,50 @@ 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); + } + } } 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-inore-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); } @@ -966,8 +1290,12 @@ int cac; char * const *cav; int c; - char * filename = NULL; - char * sdevname = 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. @@ -982,51 +1310,128 @@ 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) - /* - * 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 "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, &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-2010 Jörg Schilling\n", + printf(_("isoinfo %s (%s-%s-%s) Copyright (C) 1993-1999 %s (C) 1999-2014 %s\n"), VERSION, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Eric Youngdale"), + _("Joerg Schilling")); exit(0); } +#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); } @@ -1076,7 +1481,7 @@ #define verbose 1 if (verbose > 0 && charset != NULL) { - error("Setting input-charset to '%s' from locale.\n", + error(_("Setting input-charset to '%s' from locale.\n"), charset); } } @@ -1098,7 +1503,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 */ @@ -1108,7 +1513,7 @@ } if (filename != NULL && sdevname != NULL) { - errmsgno(EX_BAD, "Only one of -i or dev= allowed\n"); + errmsgno(EX_BAD, _("Only one of -i or dev= allowed\n")); usage(EX_BAD); } #ifdef USE_SCG @@ -1116,7 +1521,7 @@ cdr_defaults(&sdevname, NULL, NULL, NULL, NULL); #endif if (filename == NULL && sdevname == NULL) { - fprintf(stderr, "ISO-9660 image not specified\n"); + fprintf(stderr, _("ISO-9660 image not specified\n")); usage(EX_BAD); } @@ -1132,7 +1537,7 @@ #else } else { #endif - fprintf(stderr, "Unable to open %s\n", filename); + fprintf(stderr, _("Unable to open %s\n"), filename); exit(1); } @@ -1146,7 +1551,44 @@ 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))); @@ -1171,7 +1613,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); } /* @@ -1184,11 +1626,11 @@ 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(_("CD-ROM is in ISO 9660 format\n")); if (!use_joliet) list_vd(&ipd, FALSE); { @@ -1197,7 +1639,7 @@ 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], @@ -1224,13 +1666,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; } @@ -1255,7 +1697,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); } @@ -1264,7 +1706,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], @@ -1293,7 +1735,7 @@ } if (use_joliet && ((unsigned char) jpd.type[0] == ISO_VD_END)) { - fprintf(stderr, "Unable to find Joliet SVD\n"); + fprintf(stderr, _("Unable to find Joliet SVD\n")); exit(1); } @@ -1311,50 +1753,52 @@ if (ucs_level > 3) { fprintf(stderr, - "Don't know what ucs_level == %d means\n", + _("Don't know what ucs_level == %d means\n"), ucs_level); exit(1); } 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) { if (use_joliet) { - printf("\nJoliet with UCS level %d found,", ucs_level); - printf(" Joliet volume descriptor:\n"); + 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); + printf(_("\nJoliet with UCS level %d found."), ucs_level); } } else { - printf("NO Joliet present\n"); + printf(_("NO Joliet present\n")); } if (c != 0) { -/* printf("RR %X %d\n", c, c);*/ +#ifdef RR_DEBUG + printf("RR %X %d\n", c, c); +#endif if (c & RR_FLAG_SP) { printf( - "\nSUSP 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"); + _("No valid Rock Ridge signature found\n")); } else { printf( - "Rock Ridge signatures version %d found\n", + _("Rock Ridge signatures version %d found\n"), rr_version); printf( - "Rock Ridge id '%s'\n", + _("Rock Ridge id '%s'\n"), er_id); } } } else { printf( - "\nBad Rock Ridge signatures found (SU record missing)\n"); + _("\nBad Rock Ridge signatures found (SU record missing)\n")); } /* * This is currently a no op! @@ -1362,11 +1806,11 @@ * the '.' entry in the root directory. */ if (c & RR_FLAG_AA) { - printf("\nApple signatures version %d found\n", + printf(_("\nApple signatures version %d found\n"), aa_version); } } else { - printf("\nNo SUSP/Rock Ridge present\n"); + printf(_("\nNo SUSP/Rock Ridge present\n")); } if (found_eltorito) printf_bootinfo(infile, bootcat_offset); @@ -1391,12 +1835,26 @@ td = todo_idr; while (td) { parse_dir(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 @@ -1407,67 +1865,67 @@ struct iso_directory_record *idr = (struct iso_directory_record *) vp->root_directory_record; - printf("System id: "); + printf(_("System id: ")); printchars(vp->system_id, 32, ucs); putchar('\n'); - printf("Volume id: "); + printf(_("Volume id: ")); printchars(vp->volume_id, 32, ucs); putchar('\n'); - printf("Volume set id: "); + printf(_("Volume set id: ")); printchars(vp->volume_set_id, 128, ucs); putchar('\n'); - printf("Publisher id: "); + printf(_("Publisher id: ")); printchars(vp->publisher_id, 128, ucs); putchar('\n'); - printf("Data preparer id: "); + printf(_("Data preparer id: ")); printchars(vp->preparer_id, 128, ucs); putchar('\n'); - printf("Application id: "); + printf(_("Application id: ")); printchars(vp->application_id, 128, ucs); putchar('\n'); - printf("Copyright File id: "); + printf(_("Copyright File id: ")); printchars(vp->copyright_file_id, 37, ucs); putchar('\n'); - printf("Abstract File id: "); + printf(_("Abstract File id: ")); printchars(vp->abstract_file_id, 37, ucs); putchar('\n'); - printf("Bibliographic File id: "); + 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)); + 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", + printf(_("Root directory extent: %d size: %d\n"), dextent, dlen); - printf("Path table size is: %d\n", + printf(_("Path table size is: %d\n"), isonum_733((unsigned char *)vp->path_table_size)); - printf("L Path table start: %d\n", + printf(_("L Path table start: %d\n"), isonum_731(vp->type_l_path_table)); - printf("L Path opt table start: %d\n", + printf(_("L Path opt table start: %d\n"), isonum_731(vp->opt_type_l_path_table)); - printf("M Path table start: %d\n", + printf(_("M Path table start: %d\n"), isonum_732(vp->type_m_path_table)); - printf("M Path opt table start: %d\n", + printf(_("M Path opt table start: %d\n"), isonum_732(vp->opt_type_m_path_table)); - printf("Creation Date: %s\n", + printf(_("Creation Date: %s\n"), sdate(vp->creation_date)); - printf("Modification Date: %s\n", + printf(_("Modification Date: %s\n"), sdate(vp->modification_date)); - printf("Expiration Date: %s\n", + printf(_("Expiration Date: %s\n"), sdate(vp->expiration_date)); - printf("Effective Date: %s\n", + printf(_("Effective Date: %s\n"), sdate(vp->effective_date)); - printf("File structure version: %d\n", + printf(_("File structure version: %d\n"), vp->file_structure_version[0]); } } @@ -1480,17 +1938,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 } @@ -1526,21 +1984,21 @@ } 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)); + 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)); } @@ -1596,3 +2054,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-3.00~trusty~mc3man1/mkisofs/diag/isoinfo.mk cdrtools-3.01a26~trusty/mkisofs/diag/isoinfo.mk --- cdrtools-3.00~trusty~mc3man1/mkisofs/diag/isoinfo.mk 2009-11-19 00:13:33.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/diag/isoinfo.mk 2013-04-21 18:24:56.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)isoinfo.mk 1.14 09/11/19 +#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 @@ -27,16 +27,22 @@ 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 -LIBS= -lsiconv -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -ldeflt -lschily \ - $(SCSILIB) $(LIB_SOCKET) $(LIB_ICONV) $(LIB_INTL) +# +# 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-3.00~trusty~mc3man1/mkisofs/diag/isovfy.c cdrtools-3.01a26~trusty/mkisofs/diag/isovfy.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/diag/isovfy.c 2010-05-24 10:08:26.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/diag/isovfy.c 2012-12-02 20:55:24.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)isovfy.c 1.43 10/05/24 joerg */ +/* @(#)isovfy.c 1.45 12/12/02 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)isovfy.c 1.43 10/05/24 joerg"; + "@(#)isovfy.c 1.45 12/12/02 joerg"; #endif /* * File isovfy.c - verify consistency of iso9660 filesystem. @@ -11,7 +11,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999-2010 J. Schilling + * Copyright (c) 1999-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 version 2 @@ -37,6 +37,7 @@ #include #include #include +#include #include "../iso9660.h" #include "../rock.h" @@ -70,6 +71,7 @@ #define infile in_image FILE *infile = NULL; +BOOL ignerr = FALSE; int blocksize; #define PAGE sizeof (buffer) @@ -200,7 +202,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); @@ -208,7 +210,7 @@ } 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); @@ -263,22 +265,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) @@ -311,7 +313,7 @@ iline += strlen(lbuffer + iline); } if (!cont_flag && flag1 != -1 && flag1 != (flag2 & 0xFF)) { - sprintf(lbuffer+iline, "Flag %x != %x", flag1, flag2); + sprintf(lbuffer+iline, _("Flag %x != %x"), flag1, flag2); rr_goof++; iline += strlen(lbuffer + iline); } @@ -410,7 +412,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 @@ -436,7 +438,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); @@ -446,12 +448,12 @@ 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."); + 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); } @@ -461,18 +463,18 @@ 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."); + 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++) { @@ -486,38 +488,38 @@ } 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); } @@ -653,15 +655,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-inore-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); } @@ -672,11 +675,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 *sdevname = NULL; +#if defined(USE_NLS) + char *dir; +#endif off_t file_addr; int file_size; struct iso_primary_descriptor ipd; @@ -687,19 +693,39 @@ 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, + if (getallargs(&cac, &cav, opts, &help, &help, &prvers, &ignerr, &filename, &sdevname) < 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("isovfy %s (%s-%s-%s) Copyright (C) 1993-1999 Eric Youngdale (C) 1999-2010 Jörg Schilling\n", + printf(_("isovfy %s (%s-%s-%s) Copyright (C) 1993-1999 %s (C) 1999-2012 %s\n"), VERSION, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Eric Youngdale"), + _("Joerg Schilling")); exit(0); } cac = argc - 1; @@ -711,11 +737,11 @@ } } 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 && sdevname != NULL) { - errmsgno(EX_BAD, "Only one of -i or dev= allowed\n"); + errmsgno(EX_BAD, _("Only one of -i or dev= allowed\n")); usage(EX_BAD); } #ifdef USE_SCG @@ -723,7 +749,7 @@ cdr_defaults(&sdevname, NULL, NULL, NULL, NULL); #endif if (filename == NULL && sdevname == NULL) { - fprintf(stderr, "ISO-9660 image not specified\n"); + fprintf(stderr, _("ISO-9660 image not specified\n")); usage(EX_BAD); } @@ -739,7 +765,7 @@ #else } else { #endif - fprintf(stderr, "Cannot open '%s'\n", filename); + fprintf(stderr, _("Cannot open '%s'\n"), filename); exit(1); } @@ -763,9 +789,9 @@ file_size = isonum_733(idr->size); 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; @@ -784,6 +810,6 @@ fclose(infile); if (!ngoof) - printf("No errors found\n"); + printf(_("No errors found\n")); return (0); } diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/diag/isovfy.mk cdrtools-3.01a26~trusty/mkisofs/diag/isovfy.mk --- cdrtools-3.00~trusty~mc3man1/mkisofs/diag/isovfy.mk 2008-10-26 21:26:59.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/diag/isovfy.mk 2013-04-21 18:24:56.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)isovfy.mk 1.10 08/10/26 +#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 @@ -28,11 +28,16 @@ CPPOPTS += -I../../libscgcmd CPPOPTS += -I../../libcdrdeflt CPPOPTS += -DSCHILY_PRINT +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= isovfy.c \ scsi.c -LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -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= isovfy_man.mk ########################################################################### diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/diag/Makefile cdrtools-3.01a26~trusty/mkisofs/diag/Makefile --- cdrtools-3.00~trusty~mc3man1/mkisofs/diag/Makefile 2008-10-26 21:27:22.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/diag/Makefile 2010-12-19 19:28:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Makefile 1.9 08/10/26 " +#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 @@ -28,3 +28,8 @@ ########################################################################### 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-3.00~trusty~mc3man1/mkisofs/diag/MKLINKS cdrtools-3.01a26~trusty/mkisofs/diag/MKLINKS --- cdrtools-3.00~trusty~mc3man1/mkisofs/diag/MKLINKS 2008-10-26 21:27:22.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/diag/MKLINKS 2011-08-04 21:45:27.000000000 +0000 @@ -1,31 +1,34 @@ #!/bin/sh ########################################################################### -#ident "@(#)MKLINKS 1.3 08/10/26 " +#ident "@(#)MKLINKS 1.5 11/08/04 " ########################################################################### -# Written 2008 by J. Schilling +# Written 2008-2011 by J. Schilling ########################################################################### -# Copyright (c) 2008 J. Schilling +# Copyright (c) 2008-2011 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. +# The contents of this file are subject to the terms of 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 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. +# See the file CDDL.Schily.txt in this distribution for 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. +# 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" -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 -rm -f xxzzy.123 xxzzy.345 +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-3.00~trusty~mc3man1/mkisofs/dvd_file.c cdrtools-3.01a26~trusty/mkisofs/dvd_file.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/dvd_file.c 2009-11-25 19:23:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/dvd_file.c 2012-12-16 22:08:11.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)dvd_file.c 1.11 09/11/25 joerg */ +/* @(#)dvd_file.c 1.14 12/12/16 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)dvd_file.c 1.11 09/11/25 joerg"; + "@(#)dvd_file.c 1.14 12/12/16 joerg"; #endif /* * DVD_VIDEO code * Copyright (c) 2002 Olaf Beck - olaf_sc@yahoo.com - * Copyright (c) 2002-2009 Jörg Schilling + * Copyright (c) 2002-2012 Jörg Schilling */ /* * This program is free software; you can redistribute it and/or modify @@ -86,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++; @@ -182,12 +182,12 @@ _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); @@ -201,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); } @@ -253,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); @@ -261,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); @@ -305,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); @@ -338,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); @@ -363,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); @@ -375,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); @@ -406,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); @@ -417,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); @@ -427,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); @@ -437,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); @@ -492,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); } @@ -519,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); @@ -593,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); diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/dvd_reader.c cdrtools-3.01a26~trusty/mkisofs/dvd_reader.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/dvd_reader.c 2009-11-25 19:34:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/dvd_reader.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)dvd_reader.c 1.10 09/11/25 joerg */ +/* @(#)dvd_reader.c 1.11 10/12/19 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)dvd_reader.c 1.10 09/11/25 joerg"; + "@(#)dvd_reader.c 1.11 10/12/19 joerg"; #endif /* * Copyright (C) 2001, 2002 Billy Biggs , @@ -207,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)); @@ -249,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); } @@ -259,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); } diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/eltorito.c cdrtools-3.01a26~trusty/mkisofs/eltorito.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/eltorito.c 2009-11-25 19:36:28.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/eltorito.c 2012-12-02 13:32:46.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)eltorito.c 1.48 09/11/25 joerg */ +/* @(#)eltorito.c 1.51 12/12/02 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)eltorito.c 1.48 09/11/25 joerg"; + "@(#)eltorito.c 1.51 12/12/02 joerg"; #endif /* @@ -12,7 +12,7 @@ * Written by Michael Fulbright (1996). * * Copyright 1996 RedHat Software, Incorporated - * Copyright (c) 1999-2009 J. Schilling + * Copyright (c) 1999-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 @@ -44,6 +44,8 @@ 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)); @@ -74,7 +76,7 @@ char *p; if (cbe->boot_image == NULL) - comerrno(EX_BAD, "Missing boot image name, use -eltorito-boot option.\n"); + 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] != '/') { @@ -149,7 +151,7 @@ /* find the dirname directory entry */ de = search_tree_file(root, p1); if (!de) { - ex_boot_enoent("catalog directory", p1); + ex_boot_enoent(_("catalog directory"), p1); /* NOTREACHED */ } this_dir = 0; @@ -166,7 +168,7 @@ this_dir = dir; if (this_dir == 0) { - ex_boot_enoent("catalog directory", p3); + ex_boot_enoent(_("catalog directory"), p3); /* NOTREACHED */ } } else { @@ -256,7 +258,14 @@ 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; @@ -273,19 +282,28 @@ */ de2 = search_tree_file(root, boot_catalog); if (!de2 || !(de2->de_flags & MEMORY_FILE)) { - ex_boot_enoent("catalog", 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, @@ -319,18 +337,66 @@ current_boot_entry != NULL; current_boot_entry = current_boot_entry->next, offset += sizeof (boot_desc_record)) { + int newarch = arch; - if (offset >= SECTOR_SIZE) { + if (current_boot_entry->type & ELTORITO_BOOT_ID) + newarch = current_boot_entry->boot_platform; + else + current_boot_entry->boot_platform = arch; + + /* + * 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; @@ -347,7 +413,7 @@ /* now adjust boot catalog lets find boot image first */ de = search_tree_file(root, boot_entry->boot_image); if (!de) { - ex_boot_enoent("image", boot_entry->boot_image); + ex_boot_enoent(_("image"), boot_entry->boot_image); /* NOTREACHED */ } /* now make the initial/default entry for boot catalog */ @@ -368,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 */ @@ -409,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] = @@ -420,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 @@ -450,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 @@ -467,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); } @@ -519,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 */ @@ -528,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) @@ -542,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 */ @@ -572,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; } @@ -593,7 +661,7 @@ char *msg; char *pname; { - comerrno(EX_BAD, "Uh oh, I cant find the boot %s '%s' inside the target tree.\n", msg, pname); + comerrno(EX_BAD, _("Uh oh, I cant find the boot %s '%s' inside the target tree.\n"), msg, pname); /* NOTREACHED */ } @@ -606,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-3.00~trusty~mc3man1/mkisofs/files.c cdrtools-3.01a26~trusty/mkisofs/files.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/files.c 2009-11-25 19:50:20.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/files.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)files.c 1.18 09/11/25 joerg */ +/* @(#)files.c 1.19 10/12/19 joerg */ #ifndef lint static char sccsid[] = - "@(#)files.c 1.18 09/11/25 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 @@ -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; diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/hash.c cdrtools-3.01a26~trusty/mkisofs/hash.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/hash.c 2009-11-25 19:54:12.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/hash.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)hash.c 1.27 09/11/25 joerg */ +/* @(#)hash.c 1.28 10/12/19 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)hash.c 1.27 09/11/25 joerg"; + "@(#)hash.c 1.28 10/12/19 joerg"; #endif /* @@ -11,7 +11,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999,2000-2009 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 @@ -116,7 +116,7 @@ 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); }; @@ -343,7 +343,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 +358,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-3.00~trusty~mc3man1/mkisofs/ifo_read.c cdrtools-3.01a26~trusty/mkisofs/ifo_read.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/ifo_read.c 2009-11-25 19:55:25.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/ifo_read.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,12 +1,12 @@ -/* @(#)ifo_read.c 1.14 09/11/25 joerg */ +/* @(#)ifo_read.c 1.15 10/12/19 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)ifo_read.c 1.14 09/11/25 joerg"; + "@(#)ifo_read.c 1.15 10/12/19 joerg"; #endif /* * Copyright (C) 2002 Olaf Beck - * Copyright (C) 2002-2009 Jörg Schilling + * Copyright (C) 2002-2010 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 @@ -78,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); } @@ -98,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); } @@ -119,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); } @@ -141,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); } @@ -191,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); } @@ -211,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); } @@ -233,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); } @@ -255,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); } @@ -277,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); } @@ -308,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); } @@ -333,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); } @@ -383,7 +383,7 @@ } 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); } @@ -393,7 +393,7 @@ /* 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 +407,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; diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/inode.c cdrtools-3.01a26~trusty/mkisofs/inode.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/inode.c 2009-11-25 19:42:51.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/inode.c 2013-04-24 20:45:18.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)inode.c 1.14 09/11/25 Copyright 2006-2009 J. Schilling */ +/* @(#)inode.c 1.17 13/04/24 Copyright 2006-2013 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)inode.c 1.14 09/11/25 Copyright 2006-2009 J. Schilling"; + "@(#)inode.c 1.17 13/04/24 Copyright 2006-2013 J. Schilling"; #endif /* * Inode and link count handling for ISO-9660/RR @@ -14,7 +14,7 @@ * of asigning the related number to the "extent" field in the ISO * directory record. * - * Copyright (c) 2006-2009 J. Schilling + * Copyright (c) 2006-2013 J. Schilling */ /* * This program is free software; you can redistribute it and/or modify @@ -28,7 +28,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. */ #include "mkisofs.h" @@ -60,16 +60,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")); } /* @@ -124,7 +130,7 @@ 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 +143,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; @@ -158,7 +169,7 @@ */ if (s_hash->starting_block <= last_extent) comerrno(EX_BAD, - "Implementation botch: Hashed file '%s' has illegal inode %u.\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); @@ -220,14 +231,18 @@ * 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); } @@ -244,7 +259,7 @@ 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, @@ -294,7 +309,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,7 +342,7 @@ while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { errmsgno(EX_BAD, - "**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n", + _("**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n"), pnt[3], pnt[0], pnt[1], pnt[0], pnt[1]); } if (pnt[0] == 'P' && pnt[1] == 'X') { @@ -358,7 +373,7 @@ while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { errmsgno(EX_BAD, - "**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n", + _("**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n"), pnt[3], pnt[0], pnt[1], pnt[0], pnt[1]); } if (pnt[0] == 'P' && pnt[1] == 'X') { diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/iso9660.h cdrtools-3.01a26~trusty/mkisofs/iso9660.h --- cdrtools-3.00~trusty~mc3man1/mkisofs/iso9660.h 2007-07-25 22:46:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/mkisofs/isonum.c cdrtools-3.01a26~trusty/mkisofs/isonum.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/isonum.c 2009-07-08 22:25:26.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/isonum.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)isonum.c 1.8 09/07/09 Copyright 2006-2009 J. Schilling */ +/* @(#)isonum.c 1.9 10/12/19 Copyright 2006-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)isonum.c 1.8 09/07/09 Copyright 2006-2009 J. Schilling"; + "@(#)isonum.c 1.9 10/12/19 Copyright 2006-2010 J. Schilling"; #endif /* - * Copyright (c) 2006-2009 J. Schilling + * Copyright (c) 2006-2010 J. Schilling */ /* * This program is free software; you can redistribute it and/or modify @@ -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-3.00~trusty~mc3man1/mkisofs/joliet.c cdrtools-3.01a26~trusty/mkisofs/joliet.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/joliet.c 2010-05-24 09:32:06.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/joliet.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)joliet.c 1.64 10/05/24 joerg */ +/* @(#)joliet.c 1.65 10/12/19 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)joliet.c 1.64 10/05/24 joerg"; + "@(#)joliet.c 1.65 10/12/19 joerg"; #endif /* * File joliet.c - handle Win95/WinNT long file/unicode extensions for iso9660. @@ -656,7 +656,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; @@ -667,7 +667,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)) @@ -710,11 +710,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"); + _("Try to use the option -no-limit-pathtables\n")); } if (!nolimitpathtables) exit(EX_BAD); @@ -767,7 +767,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); } @@ -817,7 +817,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; @@ -878,7 +878,7 @@ break; finddir = finddir->next; if (!finddir) { - comerrno(EX_BAD, "Fatal goof - unable to find directory location\n"); + comerrno(EX_BAD, _("Fatal goof - unable to find directory location\n")); } } set_733((char *)jrec.extent, finddir->jextent); @@ -928,7 +928,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); } @@ -1114,7 +1114,7 @@ #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++; { @@ -1274,14 +1274,14 @@ if (jsort_goof) { errmsgno(EX_BAD, - "Joliet file names differ after %d chars\n", + _("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"); + _("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"); + _("Try to use the option -joliet-long\n")); } } diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/mac_label.c cdrtools-3.01a26~trusty/mkisofs/mac_label.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/mac_label.c 2009-11-25 19:10:19.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/mac_label.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,12 +1,12 @@ -/* @(#)mac_label.c 1.18 09/11/25 joerg, Copyright 1997-2000 James Pearson, Copyright 2004-2009 J. Schilling */ +/* @(#)mac_label.c 1.19 10/12/19 joerg, Copyright 1997-2000 James Pearson, Copyright 2004-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)mac_label.c 1.18 09/11/25 joerg, Copyright 1997-2000 James Pearson, Copyright 2004-2009 J. Schilling"; + "@(#)mac_label.c 1.19 10/12/19 joerg, Copyright 1997-2000 James Pearson, Copyright 2004-2010 J. Schilling"; #endif /* * Copyright (c) 1997, 1998, 1999, 2000 James Pearson - * Copyright (c) 2004-2009 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 @@ -70,14 +70,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,14 +108,14 @@ for (; i < use_prep_boot + use_chrp_boot; i++) { de = search_tree_file(root, prep_boot_image[i - use_chrp_boot]); if (!de) { - ex_boot_enoent("image", + ex_boot_enoent(_("image"), prep_boot_image[i - use_chrp_boot]); /* 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; @@ -173,17 +173,17 @@ /* 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); return (-1); } @@ -192,20 +192,20 @@ 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", + sprintf(hce->error, _("%s is not a HFS boot file"), mac_boot->name); 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); 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); return (-1); } @@ -214,7 +214,7 @@ /* check boot block is valid */ 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); } @@ -257,8 +257,8 @@ 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 */ diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/Makefile cdrtools-3.01a26~trusty/mkisofs/Makefile --- cdrtools-3.00~trusty~mc3man1/mkisofs/Makefile 2009-07-13 18:09:40.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/Makefile 2013-04-24 18:57:48.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile 1.41 09/07/13 +#ident @(#)Makefile 1.45 13/04/24 ########################################################################### # 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,10 +24,6 @@ CPPOPTS += -DUSE_FIND #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 @@ -38,11 +34,12 @@ 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"' + '-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 \ @@ -55,10 +52,13 @@ 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 +# +# LIB_CAP is needed for Linux capability support in librscg. +# LIBS= -lhfs -lfile -lsiconv -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -ldeflt \ -lfind -lschily \ $(LIB_ACL_TEST) $(SCSILIB) $(LIB_SOCKET) \ - $(LIB_ICONV) $(LIB_INTL) + $(LIB_ICONV) $(LIB_INTL) $(LIB_CAP) XMK_FILE= Makefile.man hybridman.mk Makefile.doc @@ -67,3 +67,6 @@ ########################################################################### count: $(CFILES) $(HFILES) count $r1 + +xtxt: $(CFILES) apple_driver.c + gxgettext -k_ -k__ -kperr $(CFILES) apple_driver.c diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/match.c cdrtools-3.01a26~trusty/mkisofs/match.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/match.c 2009-07-08 22:25:26.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/match.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)match.c 1.29 09/07/09 joerg */ +/* @(#)match.c 1.30 10/12/19 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)match.c 1.29 09/07/09 joerg"; + "@(#)match.c 1.30 10/12/19 joerg"; #endif /* * 27-Mar-96: Jan-Piet Mens @@ -12,7 +12,7 @@ * 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-2009 J. Schilling + * Copyright (c) 2000-2010 J. Schilling */ #include @@ -22,6 +22,7 @@ #include #include #include +#include #include "match.h" struct match { @@ -64,12 +65,12 @@ 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); } @@ -97,7 +98,7 @@ 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) { @@ -113,7 +114,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'; @@ -173,18 +174,18 @@ 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); } @@ -271,7 +272,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) { diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/mkisofs.8 cdrtools-3.01a26~trusty/mkisofs/mkisofs.8 --- cdrtools-3.00~trusty~mc3man1/mkisofs/mkisofs.8 2010-05-25 01:02:44.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/mkisofs.8 2014-12-03 21:21:11.000000000 +0000 @@ -1,7 +1,21 @@ '\" t .\" To print, first run through tbl .\" -*- nroff -*- -.\" @(#)mkisofs.8 1.135 10/04/25 joerg +.\" @(#)mkisofs.8 1.153 14/12/03 Copyright 1997-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. +.\" .\" .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,7 +29,7 @@ .if n .ds o oe .if n .ds u ue .if n .ds s sz -.TH MKISOFS 8 "2010/04/25" "Version 3.0" +.TH MKISOFS 8 "2014/12/03" "Version 3.0" .SH NAME mkisofs \- create an hybrid ISO-9660/JOLIET/HFS/UDF filesystem-image with optional Rock Ridge attributes. .SH SYNOPSIS @@ -48,7 +62,7 @@ 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 +If you like to have files larger than 2 \GB, you need to specify .B \-iso\-level 3 or above. @@ -63,7 +77,7 @@ by the .B "Rock Ridge Interchange Protocol. This is used to further describe the -files in the ISO-9660 filesystem to a unix host, and provides information such +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 @@ -109,7 +123,7 @@ 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. @@ -146,11 +160,11 @@ of .B cdrecord is available from -.B ftp://ftp.berlios.de/pub/cdrecord +.B https://sourceforge.net/projects/cdrtools/files/ or -.B ftp://ftp.berlios.de/pub/cdrecord/alpha +.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 @@ -222,6 +236,8 @@ 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. @@ -328,9 +344,11 @@ for zero sized files. .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 @@ -339,7 +357,7 @@ 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: @@ -347,6 +365,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 @@ -355,9 +382,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 @@ -639,6 +725,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 @@ -668,6 +762,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 @@ -699,6 +795,8 @@ 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 @@ -751,12 +849,16 @@ 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 ISO-9660 standard, but it happens to work on many systems. Use with caution. .TP .B \-D +.TP +.B \-disable\-deep\-relocation Do not use deep directory relocation, and instead just pack them in the way we see them. .br @@ -780,10 +882,21 @@ \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. .TP .B \-dvd\-video Generate DVD-Video compliant UDF file system. This is done by sorting the @@ -801,6 +914,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. @@ -922,7 +1037,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. @@ -1005,14 +1120,17 @@ 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 @@ -1146,6 +1264,8 @@ section below for more details. .TP .B \-l +.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 @@ -1157,13 +1277,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 @@ -1197,9 +1324,9 @@ .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\-ISO-9660\-filenames +.B \-max\-iso9660\-filenames Allow 37 chars in ISO-9660 filenames. This option forces the .B \-N @@ -1233,7 +1360,62 @@ .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 +.TP +.B \-omit\-version\-number Omit version numbers from ISO-9660 file names. .br This violates the ISO-9660 standard, but no one really uses the @@ -1242,7 +1424,9 @@ .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 @@ -1252,7 +1436,7 @@ .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 ISO-9660 filesystem contains path tables that contain a list of directories. @@ -1264,6 +1448,10 @@ 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 ISO-9660 extension records as e.g. created by NERO burning ROM. @@ -1352,7 +1540,7 @@ 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. @@ -1366,6 +1554,8 @@ 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 @@ -1427,6 +1617,8 @@ 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 ISO-9660 filesystem. The Rock Ridge protocol is needed in order to add POSIX like file meta data @@ -1435,6 +1627,8 @@ 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 @@ -1532,6 +1726,10 @@ .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 @@ -1693,6 +1891,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 @@ -1721,7 +1921,7 @@ 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 @@ -1760,6 +1960,8 @@ This option is the default on VMS. .TP .B \-U +.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, @@ -1834,6 +2036,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 @@ -2178,7 +2382,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 @@ -2187,13 +2392,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 @@ -2212,7 +2417,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 @@ -2291,8 +2496,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 @@ -2315,9 +2525,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 @@ -2494,10 +2704,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 @@ -2784,7 +2994,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 @@ -2826,10 +3036,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 @@ -2861,7 +3071,7 @@ 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 ISO-9660 and Joliet trees. @@ -3076,9 +3286,9 @@ To write a tar archive directly to a CD that will later contain a simple 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 @@ -3110,7 +3320,7 @@ 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 @@ -3130,15 +3340,15 @@ 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 @@ -3160,7 +3370,7 @@ and newer parts (starting from 1997) of the utility. J\*org Schilling is the primary maintainer since 1999, this makes .B mkisofs -Copyright (C) 1997-2010 J\*org Schilling. +Copyright (C) 1997-2014 J\*org Schilling. .PP HFS hybrid code Copyright (C) James Pearson 1997 .\|.\|. 2001. .sp @@ -3352,6 +3562,7 @@ .SH "SEE ALSO .BR cdrecord (1), .BR mkzftree (1), +.BR sfind (1), .BR magic (5), .BR apple_driver (8). @@ -3360,7 +3571,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 @@ -3373,7 +3584,7 @@ you may join the developer mailing list via this URL: .sp .B -http://lists.berlios.de/mailman/listinfo/cdrecord-developers +https://lists.sourceforge.net/lists/listinfo/cdrtools-developers .SH MAINTAINER .nf @@ -3391,12 +3602,12 @@ If you have support questions, send them to: .PP .B -cdrecord-support@berlios.de +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 @@ -3405,11 +3616,11 @@ 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 diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/mkisofs.c cdrtools-3.01a26~trusty/mkisofs/mkisofs.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/mkisofs.c 2010-04-25 14:29:03.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/mkisofs.c 2015-01-01 14:19:51.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)mkisofs.c 1.258 10/04/25 joerg */ +/* @(#)mkisofs.c 1.275 15/01/01 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)mkisofs.c 1.258 10/04/25 joerg"; + "@(#)mkisofs.c 1.275 15/01/01 joerg"; #endif /* * Program mkisofs.c - generate iso9660 filesystem based upon directory @@ -11,7 +11,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1997-2010 J. Schilling + * Copyright (c) 1997-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 @@ -126,6 +126,7 @@ 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) */ @@ -147,7 +148,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; @@ -184,7 +185,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 */ @@ -192,6 +193,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 */ @@ -207,6 +209,9 @@ void *plusp; /* residual for -exec ...{} + */ int find_patlen; /* len for -find pattern state */ +extern time_t begun; +extern struct timeval tv_begun; + LOCAL BOOL data_change_warn; LOCAL int walkflags = WALK_CHDIR | WALK_PHYS | WALK_NOEXIT; LOCAL int maxdepth = -1; @@ -309,6 +314,7 @@ 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 */ siconvt_t *in_nls = NULL; /* input UNICODE conversion table */ siconvt_t *out_nls = NULL; /* output UNICODE conversion table */ @@ -347,6 +353,7 @@ 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)); LOCAL int get_boot_image __PR((char *opt_arg)); LOCAL int get_hd_boot __PR((char *opt_arg)); @@ -354,6 +361,7 @@ 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 @@ -361,6 +369,11 @@ LOCAL int get_chrp_boot __PR((char *opt_arg)); #endif LOCAL int get_bsize __PR((char *opt_arg)); +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 hfs_cap __PR((void)); LOCAL int hfs_neta __PR((void)); @@ -388,7 +401,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 +451,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 +470,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 +479,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; { @@ -485,13 +537,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); } @@ -505,7 +557,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); } @@ -522,6 +574,211 @@ return (1); } +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); +} + LOCAL int hfs_cap() { @@ -608,7 +865,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); } @@ -641,7 +898,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; @@ -649,6 +906,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 @@ -667,6 +936,16 @@ 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 @@ -685,6 +964,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 @@ -693,6 +982,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. @@ -715,358 +1025,404 @@ 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")}, {{"cache-inodes", &cache_inodes }, - "Cache inodes (needed to detect hard links)"}, + __("Cache inodes (needed to detect hard links)")}, {{"no-cache-inodes%0", &cache_inodes }, - "Do not cache inodes (if filesystem has no unique inodes)"}, + __("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)")}, {{"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"}, + __("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")}, + {{"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"}, + __("Do not include backup files")}, {{"no-bak%0", &all_files}, - "Do not include backup 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"}, + __("\1FILE\1Sort file content locations according to rules in FILE")}, #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 {{"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)")}, {{"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])) @@ -1106,7 +1462,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"); @@ -1115,7 +1471,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) { @@ -1131,7 +1487,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 <= @@ -1144,13 +1500,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; @@ -1179,7 +1535,7 @@ pnt++; } if (name == pnt) { - fprintf(stderr, "%s:%d: name required\n", filename, + fprintf(stderr, _("%s:%d: name required\n"), filename, linum); continue; } @@ -1189,7 +1545,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); @@ -1222,13 +1578,13 @@ } } 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); } @@ -1255,31 +1611,31 @@ 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"); - 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"); + 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")); exit(excode); } @@ -1394,12 +1750,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; @@ -1451,51 +1807,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() @@ -1601,16 +1998,26 @@ 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 */ @@ -1628,7 +2035,13 @@ ++il; } flags[il].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; #if defined(IS_CYGWIN) || defined(__MINGW32__) /* @@ -1646,7 +2059,7 @@ 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); } @@ -1659,14 +2072,16 @@ if (help) usage(0); if (pversion) { - printf("mkisofs %s (%s-%s-%s) Copyright (C) 1993-1997 Eric Youngdale (C) 1997-2010 Jörg Schilling\n", + printf(_("mkisofs %s (%s-%s-%s) Copyright (C) 1993-1997 %s (C) 1997-2015 %s\n"), version_string, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Eric Youngdale"), + _("Joerg Schilling")); #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); } @@ -1690,7 +2105,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; @@ -1705,12 +2120,12 @@ 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); } } @@ -1719,21 +2134,21 @@ if (abstract) { if (strlen(abstract) > 37) { comerrno(EX_BAD, - "Abstract filename string too long (cur. %lld max. 37 chars).\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 (cur. %lld max. 128 chars).\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 (cur. %lld max. 37 chars).\n", + _("Bibliographic filename string too long (cur. %lld max. 37 chars).\n"), (Llong)strlen(biblio)); } } @@ -1741,10 +2156,10 @@ 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 (!correct_inodes) @@ -1753,7 +2168,7 @@ 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. @@ -1765,7 +2180,7 @@ if (copyright) { if (strlen(copyright) > 37) { comerrno(EX_BAD, - "Copyright filename string too long (cur. %lld max. 37 chars).\n", + _("Copyright filename string too long (cur. %lld max. 37 chars).\n"), (Llong)strlen(copyright)); } } @@ -1786,10 +2201,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) @@ -1804,13 +2223,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) { @@ -1822,7 +2241,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) { @@ -1866,7 +2285,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); } @@ -1888,15 +2307,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) { @@ -1907,20 +2326,20 @@ 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 (cur. %lld max. 128 chars).\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 (cur. %lld max. 128 chars).\n", + _("Publisher string too long (cur. %lld max. 128 chars).\n"), (Llong)strlen(publisher)); } } @@ -1931,10 +2350,10 @@ 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"; @@ -1942,7 +2361,7 @@ 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) @@ -1950,7 +2369,7 @@ 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) { @@ -1973,7 +2392,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) { @@ -2012,31 +2431,31 @@ if (volume_id) { if (strlen(volume_id) > 32) { comerrno(EX_BAD, - "Volume ID string too long (cur. %lld max. 32 chars).\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 (cur. %lld max. 128 chars).\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) { @@ -2046,7 +2465,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 @@ -2054,7 +2473,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; @@ -2063,7 +2482,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; @@ -2074,7 +2493,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; @@ -2086,7 +2505,7 @@ hfs_parms = e_strdup(hfs_parms); if (apple_hyb && apple_ext) { - comerrno(EX_BAD, "Can't have both -apple and -hfs options\n"); + comerrno(EX_BAD, _("Can't have both -apple and -hfs options\n")); } /* * if -probe, -macname, any hfs selection and/or mapping file is given, @@ -2099,13 +2518,15 @@ 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"); + _("Warning: no HFS hybrid will be created with -udf and --osx-hfs\n")); } } +#endif } } #ifdef UDF @@ -2113,7 +2534,7 @@ create_udfsymlinks = 0; #if 0 if (use_RockRidge && use_udf && create_udfsymlinks) { - error("Warning: cannot create UDF symlinks with activated Rock Ridge\n"); + error(_("Warning: cannot create UDF symlinks with activated Rock Ridge\n")); create_udfsymlinks = 0; } #endif @@ -2124,26 +2545,28 @@ if (apple_hyb && !donotwrite_macpart && do_largefiles > 0) { do_largefiles = 0; maxnonlarge = (off_t)0x7FFFFFFF; - error("Warning: cannot support large files with -hfs\n"); + 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"); + 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"); + 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"); + 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"); + 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"); + 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"); + comerrno(EX_BAD, _("Can't have -prep-boot with -apple\n")); } #endif /* PREP_BOOT */ @@ -2156,12 +2579,12 @@ if (apple_both && verbose && !(hfs_select || *afpfile || magic_file)) { errmsgno(EX_BAD, - "Warning: no Apple/Unix files will be decoded/mapped\n"); + _("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"); + _("Warning: assuming PC Exchange cluster size of 512 bytes\n")); afe_size = 512; } if (apple_both) { @@ -2178,7 +2601,7 @@ #endif } if (apple_ext && !(use_XA || use_RockRidge)) { - comerrno(EX_BAD, "Need either -XA/-xa or -R/-r for -apple to become active.\n"); + comerrno(EX_BAD, _("Need either -XA/-xa or -R/-r for -apple to become active.\n")); } #endif /* APPLE_HYB */ @@ -2207,38 +2630,42 @@ * XXX This is a hack until we have a decent separate name handling * XXX for UDF filenames. */ +#ifdef DVD_VIDEO if (dvd_video && use_Joliet) { use_Joliet = 0; - error("Warning: Disabling Joliet support for DVD-Video.\n"); + error(_("Warning: Disabling Joliet support for DVD-Video.\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) @@ -2286,7 +2713,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); } } @@ -2316,7 +2743,7 @@ out_nls = sic_open(ocharset); if (in_nls == NULL || out_nls == NULL) { /* Unknown charset specified */ - fprintf(stderr, "Unknown charset '%s'.\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); @@ -2329,9 +2756,9 @@ 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 @@ -2352,7 +2779,7 @@ if (use_mac_name) apple_hyb = 1; if (apple_hyb && (hfs_inls == NULL || hfs_onls == NULL)) { - fprintf(stderr, "Unknown HFS charset '%s'.\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); @@ -2362,9 +2789,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 */ @@ -2372,7 +2799,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); } } @@ -2386,7 +2813,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 @@ -2396,11 +2823,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 @@ -2416,16 +2843,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 */ @@ -2436,7 +2863,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 @@ -2448,7 +2875,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); } } @@ -2462,19 +2889,23 @@ 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 || use_genboot || use_prep_boot || hfs_boot_file) comerrno(EX_BAD, - "Cannot use boot options with -stream-media-size\n"); + _("Cannot use boot options with -stream-media-size\n")); 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")); } if (use_RockRidge) { @@ -2499,17 +2930,17 @@ /* 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++) @@ -2579,7 +3010,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); @@ -2592,44 +3023,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, "SUSP signatures version %d found\n", su_version); + 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"); + _("No valid Rock Ridge signature found\n")); if (!force_rr) no_rr++; } else { fprintf(stderr, - "Rock Ridge signatures version %d found\n", + _("Rock Ridge signatures version %d found\n"), rr_version); fprintf(stderr, - "Rock Ridge id '%s'\n", er_id); + _("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 SUSP/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, @@ -2658,7 +3089,7 @@ walkinitstate(&walkstate); if (find_patlen > 0) { walkstate.patstate = ___malloc(sizeof (int) * find_patlen, - "space for pattern state"); + _("space for pattern state")); } find_timeinit(time(0)); @@ -2726,7 +3157,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); } /* @@ -2736,7 +3167,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(); @@ -2779,7 +3210,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) { @@ -2789,7 +3220,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 @@ -2799,20 +3230,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; setmode(fileno(stdout), O_BINARY); } +#ifdef HAVE_SETVBUF + setvbuf(discimage, NULL, _IOFBF, 64*1024); +#endif /* Now assign addresses on the disc for the path table. */ @@ -2935,7 +3369,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); } @@ -2950,7 +3384,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) (); } @@ -3027,7 +3461,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); @@ -3048,31 +3482,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); } @@ -3090,18 +3524,22 @@ n = sic_list(stdout); if (n <= 0) { - errmsgno(EX_BAD, "Installation problem: '%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 } @@ -3335,11 +3773,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); } @@ -3350,7 +3788,7 @@ exit(1); } if (debug) { - error("scan done\n"); + error(_("scan done\n")); } } else { if (short_name == NULL) { @@ -3364,7 +3802,7 @@ } } 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); @@ -3393,7 +3831,7 @@ if (size == 0) size = 1; if ((pt = malloc(size)) == NULL) { - comerr("Not enough memory\n"); + comerr(_("Not enough memory\n")); } /* * Not all code is clean yet. @@ -3411,7 +3849,7 @@ char *ret = strdup(s); if (s == NULL) - comerr("Not enough memory for strdup(%s)\n", s); + comerr(_("Not enough memory for strdup(%s)\n"), s); return (ret); } diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/mkisofs.h cdrtools-3.01a26~trusty/mkisofs/mkisofs.h --- cdrtools-3.00~trusty~mc3man1/mkisofs/mkisofs.h 2010-04-25 14:29:03.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/mkisofs.h 2013-04-25 21:10:08.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)mkisofs.h 1.140 10/04/25 joerg */ +/* @(#)mkisofs.h 1.148 13/04/25 joerg */ /* * Header file mkisofs.h - assorted structure definitions and typecasts. * * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999,2000-2010 J. Schilling + * Copyright (c) 1999,2000-2013 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,6 +26,8 @@ #include /* Must be before stdio.h for LARGEFILE support */ #include +#include +#include #include #include #include /* Needed for for LARGEFILE support */ @@ -33,7 +35,9 @@ #include #include #include -#include +#include +#include +#include /* Define missing prototypes */ #include "scsi.h" #ifdef DVD_VIDEO @@ -89,6 +93,15 @@ #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; @@ -107,8 +120,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 */ @@ -294,8 +311,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; @@ -510,6 +542,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 * @@ -549,6 +582,7 @@ /* 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)); @@ -672,6 +706,7 @@ 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)); diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/multi.c cdrtools-3.01a26~trusty/mkisofs/multi.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/multi.c 2009-11-25 19:04:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/multi.c 2012-12-02 21:00:54.000000000 +0000 @@ -1,15 +1,15 @@ -/* @(#)multi.c 1.95 09/11/25 joerg */ +/* @(#)multi.c 1.97 12/12/02 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)multi.c 1.95 09/11/25 joerg"; + "@(#)multi.c 1.97 12/12/02 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-2009 J. Schilling + * Copyright (c) 1999-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 @@ -86,6 +86,7 @@ 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; @@ -120,11 +121,11 @@ 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"); + 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); } @@ -184,7 +185,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; @@ -198,16 +199,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) { @@ -277,7 +278,7 @@ while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { errmsgno(EX_BAD, - "**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n", + _("**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 ??? */ } @@ -374,7 +375,7 @@ while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { errmsgno(EX_BAD, - "**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n", + _("**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n"), pnt[3], pnt[0], pnt[1], pnt[0], pnt[1]); return (-1); } @@ -466,7 +467,7 @@ while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { errmsgno(EX_BAD, - "**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n", + _("**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n"), pnt[3], pnt[0], pnt[1], pnt[0], pnt[1]); return (-1); } @@ -627,7 +628,7 @@ 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", + comerrno(EX_BAD, _("Bad directory length for '%.*s'.\n"), idr->name_len[0] & 0xFF, idr->name); } if (idr->length[0] == 0) { @@ -737,7 +738,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) && @@ -954,11 +955,11 @@ * 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) { @@ -1297,7 +1298,7 @@ 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; @@ -1319,13 +1320,13 @@ /* 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); } @@ -1338,7 +1339,7 @@ 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; @@ -1349,7 +1350,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; @@ -1643,14 +1644,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'; @@ -1706,7 +1707,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); } @@ -1753,7 +1754,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; @@ -1762,7 +1763,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); } @@ -1947,7 +1948,7 @@ while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { errmsgno(EX_BAD, - "**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n", + _("**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, "CL", 2) == 0) { @@ -2050,7 +2051,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-3.00~trusty~mc3man1/mkisofs/name.c cdrtools-3.01a26~trusty/mkisofs/name.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/name.c 2009-07-10 19:49:34.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/name.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)name.c 1.37 09/07/10 joerg */ +/* @(#)name.c 1.38 10/12/19 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)name.c 1.37 09/07/10 joerg"; + "@(#)name.c 1.38 10/12/19 joerg"; #endif /* @@ -14,7 +14,7 @@ * Almost totally rewritten by J. Schilling (2000). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999,2000-2009 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 @@ -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) @@ -275,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++; diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/rock.c cdrtools-3.01a26~trusty/mkisofs/rock.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/rock.c 2009-11-25 19:14:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/rock.c 2012-12-02 13:33:49.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)rock.c 1.62 09/11/25 joerg */ +/* @(#)rock.c 1.66 12/12/02 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)rock.c 1.62 09/11/25 joerg"; + "@(#)rock.c 1.66 12/12/02 joerg"; #endif /* * File rock.c - generate RRIP records for iso9660 filesystems. @@ -10,7 +10,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999,2000-2009 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 @@ -56,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, @@ -128,13 +130,13 @@ { 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) @@ -380,7 +382,7 @@ } if (use < 0) { comerrno(EX_BAD, - "Negative RR name length residual: %d\n", + _("Negative RR name length residual: %d\n"), use); } @@ -514,7 +516,7 @@ (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 */ @@ -541,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)) @@ -717,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) { @@ -912,7 +934,7 @@ 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); memset(pnt, 0, SECTOR_SIZE); diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/rock.h cdrtools-3.01a26~trusty/mkisofs/rock.h --- cdrtools-3.00~trusty~mc3man1/mkisofs/rock.h 2009-11-25 17:34:49.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/rock.h 2014-04-28 22:22:12.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)rock.h 1.2 09/11/25 Copyright 2003-2009 J. Schilling */ +/* @(#)rock.h 1.3 14/04/29 Copyright 2003-2014 J. Schilling */ /* * Header file for the Rock Ridge encoder and parser * - * Copyright (c) 2003-2009 J. Schilling + * Copyright (c) 2003-2014 J. Schilling */ /* * This program is free software; you can redistribute it and/or modify @@ -16,7 +16,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. */ /* @@ -32,6 +32,8 @@ #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 */ diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/scsi.c cdrtools-3.01a26~trusty/mkisofs/scsi.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/scsi.c 2009-07-08 22:25:26.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/scsi.c 2012-12-02 21:00:54.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)scsi.c 1.33 09/07/09 Copyright 1997-2009 J. Schilling */ +/* @(#)scsi.c 1.35 12/12/02 Copyright 1997-2012 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)scsi.c 1.33 09/07/09 Copyright 1997-2009 J. Schilling"; + "@(#)scsi.c 1.35 12/12/02 Copyright 1997-2012 J. Schilling"; #endif /* - * Copyright (c) 1997-2009 J. Schilling + * Copyright (c) 1997-2012 J. Schilling */ /* * This program is free software; you can redistribute it and/or modify @@ -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); } @@ -137,13 +144,13 @@ /* 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-3.00~trusty~mc3man1/mkisofs/stream.c cdrtools-3.01a26~trusty/mkisofs/stream.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/stream.c 2009-11-25 17:38:18.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/stream.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)stream.c 1.15 09/11/25 Copyright 2002-2009 J. Schilling */ +/* @(#)stream.c 1.16 10/12/19 Copyright 2002-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)stream.c 1.15 09/11/25 Copyright 2002-2009 J. Schilling"; + "@(#)stream.c 1.16 10/12/19 Copyright 2002-2010 J. Schilling"; #endif /* * ISO-9660 stream (pipe) file module for mkisofs * - * Copyright (c) 2002-2009 J. Schilling + * Copyright (c) 2002-2010 J. Schilling * Implemented after an idea from M.H. Voase */ /* @@ -77,7 +77,7 @@ if (n >= avail_extent) { comerrno(EX_BAD, - "-stream-media-size %d but must be at least %d\n", + _("-stream-media-size %d but must be at least %d\n"), avail_extent, n+2); } avail_extent -= n; diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/tree.c cdrtools-3.01a26~trusty/mkisofs/tree.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/tree.c 2010-05-24 09:31:22.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/tree.c 2014-05-03 15:01:18.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)tree.c 1.123 10/05/24 joerg */ +/* @(#)tree.c 1.131 14/05/03 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)tree.c 1.123 10/05/24 joerg"; + "@(#)tree.c 1.131 14/05/03 joerg"; #endif /* * File tree.c - scan directory tree and build memory structures for iso9660 @@ -11,7 +11,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999,2000-2010 J. Schilling + * Copyright (c) 1999,2000-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 as published by @@ -331,7 +331,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); } /* @@ -400,7 +400,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 */ @@ -425,7 +425,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: @@ -435,7 +435,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); @@ -492,7 +492,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); @@ -675,7 +675,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); } @@ -684,12 +684,12 @@ status = sort_directory(&this_dir->contents, (reloc_dir == this_dir)); if (status > 0) { - errmsgno(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"); + _("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"); + _("use -graft-points to create different target directory names.\n")); } /* * If we are filling out a TRANS.TBL, generate the entries that will @@ -745,7 +745,7 @@ if (count != tablesize) { comerrno(EX_BAD, - "Translation table size mismatch %d %d\n", + _("Translation table size mismatch %d %d\n"), count, tablesize); } } @@ -1011,7 +1011,7 @@ while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { errmsgno(EX_BAD, - "**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n", + _("**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) @@ -1052,7 +1052,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) { @@ -1115,14 +1115,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")); } } @@ -1142,7 +1142,7 @@ 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; @@ -1153,7 +1153,7 @@ return (1); if (verbose > 1) { - fprintf(stderr, "Scanning %s\n", path); + fprintf(stderr, _("Scanning %s\n"), path); } /*#define check_needed*/ #ifdef check_needed @@ -1163,7 +1163,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 @@ -1187,7 +1187,7 @@ 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) { /* @@ -1275,7 +1275,7 @@ rstr(d_name, ".bak")) { if (verbose > 0) { fprintf(stderr, - "Ignoring file %s\n", + _("Ignoring file %s\n"), d_name); } continue; @@ -1293,9 +1293,9 @@ #endif /* APPLE_HYB */ if (strlen(path) + strlen(d_name) + 2 > sizeof (whole_path)) { - errmsgno(EX_BAD, "Path name %s/%s too long.\n", + errmsgno(EX_BAD, _("Path name %s/%s too long.\n"), path, d_name); - comerrno(EX_BAD, "Overflow of stat buffer\n"); + comerrno(EX_BAD, _("Overflow of stat buffer\n")); }; /* @@ -1317,7 +1317,7 @@ (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; } @@ -1329,7 +1329,7 @@ * 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; } @@ -1481,7 +1481,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) && @@ -1517,6 +1517,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); @@ -1531,18 +1532,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 */ @@ -1565,7 +1569,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); } @@ -1611,8 +1615,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 @@ -1620,7 +1623,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); } @@ -1638,7 +1641,7 @@ #else errno = EFBIG; #endif - errmsg("File %s is too large for current mkisofs settings - ignoring\n", + errmsg(_("File %s is too large for current mkisofs settings (-iso-level 3 or more required) - ignoring\n"), whole_path); return (0); } @@ -1652,9 +1655,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)); } @@ -1665,7 +1668,7 @@ !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", + _("Unknown file type (%s) %s - ignoring and continuing.\n"), filetype((int)lstatbuf.st_mode), whole_path); return (0); } @@ -1673,7 +1676,7 @@ * 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); } @@ -1681,7 +1684,7 @@ #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); + _("'%s' is the archive. Not dumped.\n"), whole_path); return (0); } @@ -1749,7 +1752,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); } } @@ -1824,7 +1827,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; @@ -1832,7 +1835,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; @@ -1846,7 +1849,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; @@ -1860,7 +1863,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; @@ -2035,7 +2038,11 @@ 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 { @@ -2157,7 +2164,7 @@ (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 @@ -2310,12 +2317,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) @@ -2323,6 +2341,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. @@ -2358,7 +2379,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; } @@ -2499,10 +2520,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"); + comerrno(EX_BAD, _("Panic no node name.\n")); } pnt = strrchr(path, PATH_SEPARATOR); if (pnt == NULL) { @@ -2641,7 +2662,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) { @@ -2745,6 +2766,12 @@ 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); } @@ -2771,7 +2798,7 @@ 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; @@ -2796,7 +2823,7 @@ } 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); @@ -2863,9 +2890,9 @@ 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, '/'); } @@ -2876,13 +2903,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; @@ -2895,7 +2922,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)); } @@ -2918,7 +2945,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); } @@ -2930,17 +2957,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 @@ -2949,8 +2976,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-3.00~trusty~mc3man1/mkisofs/udf.c cdrtools-3.01a26~trusty/mkisofs/udf.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/udf.c 2009-07-08 22:25:26.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/udf.c 2013-04-24 20:45:18.000000000 +0000 @@ -1,15 +1,15 @@ -/* @(#)udf.c 1.34 09/07/09 Copyright 2001-2009 J. Schilling */ +/* @(#)udf.c 1.42 13/04/24 Copyright 2001-2013 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)udf.c 1.34 09/07/09 Copyright 2001-2009 J. Schilling"; + "@(#)udf.c 1.42 13/04/24 Copyright 2001-2013 J. Schilling"; #endif /* * udf.c - UDF support for mkisofs * * Written by Ben Rudiak-Gould (2001). * - * Copyright 2001-2009 J. Schilling. + * Copyright 2001-2013 J. Schilling. */ /* * This program is free software; you can redistribute it and/or modify @@ -23,12 +23,25 @@ * * 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. */ /* * 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. * @@ -71,10 +84,10 @@ * mechanism to handle this case. I don't know if it's worth the trouble. */ -#ifdef UDF - #include "mkisofs.h" +#ifdef UDF #include +#include #include #include @@ -112,6 +125,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 +150,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 +165,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 +262,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 +333,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 +629,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; @@ -862,34 +924,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 +962,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 +1012,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 +1032,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 +1050,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 +1194,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 +1204,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 +1248,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 +1267,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 +1398,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 +1439,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 +1463,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 +1510,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 +1553,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 +1573,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 +1747,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 +1755,7 @@ #else NULL, #endif - dpnt->self->mode, - dpnt->self->uid, - dpnt->self->gid); + dpnt->self); } else { #endif set_filed_entry( @@ -1673,7 +1763,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 +1771,7 @@ #else NULL, #endif - dpnt->self->mode, - dpnt->self->uid, - dpnt->self->gid); + dpnt->self); #ifdef INSERTMACRESFORK } #endif @@ -1733,7 +1820,7 @@ } if (!de1) { comerrno(EX_BAD, - "Unable to locate relocated directory\n"); + _("Unable to locate relocated directory\n")); } } @@ -1777,15 +1864,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 +1888,23 @@ logical_block = 0; } #endif + if (correct_inodes && + (s_hash = find_hash(de->dev, de->inode)) != 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 +1915,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 +1929,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 +1939,7 @@ #else NULL, #endif - de->mode, - de->uid, - de->gid); + de); xfwrite(buf, SECTOR_SIZE, 1, outfile, 0, FALSE); } #endif diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/udf_fs.h cdrtools-3.01a26~trusty/mkisofs/udf_fs.h --- cdrtools-3.00~trusty~mc3man1/mkisofs/udf_fs.h 2007-06-24 15:15:27.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/mkisofs/volume.c cdrtools-3.01a26~trusty/mkisofs/volume.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/volume.c 2009-07-08 22:25:26.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/volume.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,12 +1,12 @@ -/* @(#)volume.c 1.24 09/07/09 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson, Copyright 2004-2009 J. Schilling */ +/* @(#)volume.c 1.25 10/12/19 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson, Copyright 2004-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)volume.c 1.24 09/07/09 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson, Copyright 2004-2009 J. Schilling"; + "@(#)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-2009 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 @@ -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); } diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/walk.c cdrtools-3.01a26~trusty/mkisofs/walk.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/walk.c 2009-07-08 22:25:26.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/walk.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,14 +1,14 @@ -/* @(#)walk.c 1.10 09/07/09 Copyright 2005-2009 J. Schilling */ +/* @(#)walk.c 1.11 10/12/19 Copyright 2005-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)walk.c 1.10 09/07/09 Copyright 2005-2009 J. Schilling"; + "@(#)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-2009 J. Schilling + * Copyright (c) 2005-2010 J. Schilling */ /* * This program is free software; you can redistribute it and/or modify @@ -43,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); } @@ -97,7 +97,7 @@ 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?de->whole_name:"[null]", de?de->de_name:"[null]", diff -Nru cdrtools-3.00~trusty~mc3man1/mkisofs/write.c cdrtools-3.01a26~trusty/mkisofs/write.c --- cdrtools-3.00~trusty~mc3man1/mkisofs/write.c 2010-06-01 20:15:39.000000000 +0000 +++ cdrtools-3.01a26~trusty/mkisofs/write.c 2014-02-11 22:36:59.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)write.c 1.129 10/06/01 joerg */ +/* @(#)write.c 1.138 14/02/11 joerg */ #include #ifndef lint static UConst char sccsid[] = - "@(#)write.c 1.129 10/06/01 joerg"; + "@(#)write.c 1.138 14/02/11 joerg"; #endif /* * Program write.c - dump memory structures to file for iso9660 filesystem. @@ -10,7 +10,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999-2010 J. Schilling + * Copyright (c) 1999-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 as published by @@ -54,7 +54,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 @@ -76,7 +76,7 @@ LOCAL int vol_desc_sum; #ifndef APPLE_HFS_HYB - char *hfs_error = "no error"; + char *hfs_error = __("no error"); #endif LOCAL int xawrite __PR((void *buffer, int size, int count, @@ -182,11 +182,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(); } @@ -201,7 +201,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) { @@ -214,7 +214,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 @@ -251,7 +251,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; @@ -299,6 +299,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 @@ -373,7 +374,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; @@ -386,7 +391,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); } } @@ -418,10 +423,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. @@ -430,13 +440,17 @@ */ if (geterrno() == 0) { if (!errhidden(amt > remain ? E_GROW:E_SHRINK, filename)) { - if (!errwarnonly(amt < remain ? E_SHRINK:E_GROW, filename)) - errmsgno(EX_BAD, "Try to use the option -data-change-warn\n"); + 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); @@ -444,7 +458,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 */ @@ -492,10 +506,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)); @@ -531,13 +545,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); @@ -561,7 +575,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 @@ -571,7 +585,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 { @@ -647,7 +661,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"); @@ -694,7 +708,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++; @@ -707,7 +721,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++; @@ -834,8 +848,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 { @@ -1005,9 +1018,25 @@ 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); + if (s_entry->de_flags & MULTI_EXTENT) { + struct directory_entry *s_e; + + s_entry->mxroot->starting_block = start_extent; + set_733((char *)s_entry->mxroot->isorec.extent, + start_extent); + 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, + start_extent); + s_entry->starting_block = start_extent; + start_extent += ISO_BLOCKS(s_e->size); + } + } else { + set_733((char *)s_entry->isorec.extent, start_extent); + start_extent += ISO_BLOCKS(s_entry->size); + } #ifdef DVD_VIDEO /* * Shouldn't this be done for every type of sort? Otherwise @@ -1056,7 +1085,7 @@ 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) { @@ -1064,7 +1093,7 @@ * Do not switch off -dvd-video but let is fail later. */ /* dvd_video = 0;*/ - errmsgno(EX_BAD, "Unable to parse DVD-Video structures.\n"); + errmsgno(EX_BAD, _("Unable to parse DVD-Video structures.\n")); } else { ret = TRUE; } @@ -1090,7 +1119,8 @@ s_hash = find_hash(s_entry->dev, s_entry->inode); 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); } @@ -1115,7 +1145,7 @@ */ 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; @@ -1162,7 +1192,7 @@ } #endif comerrno(EX_BAD, - "Fatal goof - could not find dir entry for '%s'\n", + _("Fatal goof - could not find dir entry for '%s'\n"), s_entry->name); } } @@ -1241,15 +1271,16 @@ 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 */ @@ -1306,7 +1337,7 @@ */ 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; @@ -1367,13 +1398,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); } @@ -1383,13 +1414,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); } @@ -1417,7 +1448,7 @@ } if (dvd_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 */ return (ret); @@ -1502,9 +1533,8 @@ 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) { @@ -1567,7 +1597,7 @@ #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 @@ -1580,9 +1610,10 @@ ce_index = ISO_ROUND_UP(ce_index); } set_733((char *)pnt + 4, - (ce_address + ce_index) >> 11); + ce_address + (ce_index >> 11)); set_733((char *)pnt + 12, - (ce_address + ce_index) & (SECTOR_SIZE - 1)); + ce_index & (SECTOR_SIZE - 1)); + /* @@ -1625,7 +1656,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); } @@ -1637,7 +1668,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); @@ -1737,7 +1768,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; @@ -1752,7 +1783,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]; @@ -1775,11 +1806,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"); + _("Try to use the option -no-limit-pathtables\n")); } if (!nolimitpathtables) exit(EX_BAD); @@ -1806,7 +1837,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); } @@ -1881,20 +1912,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. */ @@ -1930,29 +1961,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, @@ -1973,36 +2004,13 @@ { 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)); @@ -2078,8 +2086,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); @@ -2386,7 +2398,7 @@ if (!assign_file_addresses(root, FALSE)) { #ifdef DVD_VIDEO if (dvd_video) { - comerrno(EX_BAD, "Unable to make a DVD-Video image.\n"); + comerrno(EX_BAD, _("Unable to make a DVD-Video image.\n")); } #else ; diff -Nru cdrtools-3.00~trusty~mc3man1/Mocsw cdrtools-3.01a26~trusty/Mocsw --- cdrtools-3.00~trusty~mc3man1/Mocsw 2009-05-30 22:55:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/Mocsw 2013-06-19 20:23:36.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Mocsw 1.2 09/05/31 " +#ident "@(#)Mocsw 1.4 13/06/19 " ########################################################################### deftgt: SRCROOT= . @@ -6,5 +6,16 @@ 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/ $@ + $(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-3.00~trusty~mc3man1/.pc/.quilt_patches cdrtools-3.01a26~trusty/.pc/.quilt_patches --- cdrtools-3.00~trusty~mc3man1/.pc/.quilt_patches 2013-12-03 01:27:12.000000000 +0000 +++ cdrtools-3.01a26~trusty/.pc/.quilt_patches 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -debian/patches diff -Nru cdrtools-3.00~trusty~mc3man1/.pc/.quilt_series cdrtools-3.01a26~trusty/.pc/.quilt_series --- cdrtools-3.00~trusty~mc3man1/.pc/.quilt_series 2013-12-03 01:27:12.000000000 +0000 +++ cdrtools-3.01a26~trusty/.pc/.quilt_series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -series diff -Nru cdrtools-3.00~trusty~mc3man1/.pc/.version cdrtools-3.01a26~trusty/.pc/.version --- cdrtools-3.00~trusty~mc3man1/.pc/.version 2013-12-03 01:27:12.000000000 +0000 +++ cdrtools-3.01a26~trusty/.pc/.version 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -2 diff -Nru cdrtools-3.00~trusty~mc3man1/pkgdefs/CSW/CSWcdrtools/pkginfo cdrtools-3.01a26~trusty/pkgdefs/CSW/CSWcdrtools/pkginfo --- cdrtools-3.00~trusty~mc3man1/pkgdefs/CSW/CSWcdrtools/pkginfo 2008-05-01 16:06:17.000000000 +0000 +++ cdrtools-3.01a26~trusty/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 +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-3.00~trusty~mc3man1/pkgdefs/CSW/CSWcdrtools/prototype cdrtools-3.01a26~trusty/pkgdefs/CSW/CSWcdrtools/prototype --- cdrtools-3.00~trusty~mc3man1/pkgdefs/CSW/CSWcdrtools/prototype 2010-05-14 14:41:11.000000000 +0000 +++ cdrtools-3.01a26~trusty/pkgdefs/CSW/CSWcdrtools/prototype 2011-09-28 19:13:49.000000000 +0000 @@ -90,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-3.00~trusty~mc3man1/pkgdefs/OCSW/CSWcdrtools/checkpkg_override cdrtools-3.01a26~trusty/pkgdefs/OCSW/CSWcdrtools/checkpkg_override --- cdrtools-3.00~trusty~mc3man1/pkgdefs/OCSW/CSWcdrtools/checkpkg_override 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/pkgdefs/OCSW/CSWcdrtools/copyright cdrtools-3.01a26~trusty/pkgdefs/OCSW/CSWcdrtools/copyright --- cdrtools-3.00~trusty~mc3man1/pkgdefs/OCSW/CSWcdrtools/copyright 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/pkgdefs/OCSW/CSWcdrtools/depend cdrtools-3.01a26~trusty/pkgdefs/OCSW/CSWcdrtools/depend --- cdrtools-3.00~trusty~mc3man1/pkgdefs/OCSW/CSWcdrtools/depend 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/pkgdefs/OCSW/CSWcdrtools/Makefile cdrtools-3.01a26~trusty/pkgdefs/OCSW/CSWcdrtools/Makefile --- cdrtools-3.00~trusty~mc3man1/pkgdefs/OCSW/CSWcdrtools/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/pkgdefs/OCSW/CSWcdrtools/pkginfo cdrtools-3.01a26~trusty/pkgdefs/OCSW/CSWcdrtools/pkginfo --- cdrtools-3.00~trusty~mc3man1/pkgdefs/OCSW/CSWcdrtools/pkginfo 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/pkgdefs/OCSW/CSWcdrtools/prototype cdrtools-3.01a26~trusty/pkgdefs/OCSW/CSWcdrtools/prototype --- cdrtools-3.00~trusty~mc3man1/pkgdefs/OCSW/CSWcdrtools/prototype 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/PORTING cdrtools-3.01a26~trusty/PORTING --- cdrtools-3.00~trusty~mc3man1/PORTING 2008-10-12 18:27:52.000000000 +0000 +++ cdrtools-3.01a26~trusty/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. diff -Nru cdrtools-3.00~trusty~mc3man1/readcd/io.c cdrtools-3.01a26~trusty/readcd/io.c --- cdrtools-3.00~trusty~mc3man1/readcd/io.c 2009-07-10 19:44:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/readcd/io.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)io.c 1.7 09/07/10 Copyright 1988-2009 J. Schilling */ +/* @(#)io.c 1.8 10/12/19 Copyright 1988-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)io.c 1.7 09/07/10 Copyright 1988-2009 J. Schilling"; + "@(#)io.c 1.8 10/12/19 Copyright 1988-2010 J. Schilling"; #endif /* - * Copyright (c) 1988-2009 J. Schilling + * Copyright (c) 1988-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -27,6 +27,7 @@ #include #include #include +#include #include #include "iodefs.h" @@ -74,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') { @@ -96,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; @@ -207,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-3.00~trusty~mc3man1/readcd/Makefile cdrtools-3.01a26~trusty/readcd/Makefile --- cdrtools-3.00~trusty~mc3man1/readcd/Makefile 2009-01-14 18:37:43.000000000 +0000 +++ cdrtools-3.01a26~trusty/readcd/Makefile 2013-04-21 18:10:14.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)readcd.mk 1.17 09/01/14 +#ident @(#)readcd.mk 1.19 13/04/21 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -13,24 +13,30 @@ 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 \ scsi_cdr.c \ scsi_mmc.c \ - misc.c + misc.c priv.c HFILES= #LIBS= -lschily $(LIB_SOCKET) -LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -ledc_ecc_dec -ledc_ecc -lcdrdeflt -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: +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 +$(ALLTARGETS): cd_misc.c scsi_scan.c scsi_cdr.c priv.c ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.cmd diff -Nru cdrtools-3.00~trusty~mc3man1/readcd/MKLINKS cdrtools-3.01a26~trusty/readcd/MKLINKS --- cdrtools-3.00~trusty~mc3man1/readcd/MKLINKS 2008-10-26 21:45:26.000000000 +0000 +++ cdrtools-3.01a26~trusty/readcd/MKLINKS 2013-04-21 18:10:14.000000000 +0000 @@ -1,10 +1,10 @@ #!/bin/sh ########################################################################### -#ident "@(#)MKLINKS 1.3 08/10/26 " +#ident "@(#)MKLINKS 1.6 13/04/21 " ########################################################################### -# Written 2008 by J. Schilling +# Written 2008-2011 by J. Schilling ########################################################################### -# Copyright (c) 2008 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 @@ -17,12 +17,18 @@ # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### symlink="ln -s" -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 -rm -f xxzzy.123 xxzzy.345 +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 . @@ -31,3 +37,4 @@ $symlink ../cdrecord/scsi_cdr.c . $symlink ../cdrecord/scsi_mmc.c . $symlink ../cdrecord/scsi_scan.c . +$symlink ../cdrecord/priv.c . diff -Nru cdrtools-3.00~trusty~mc3man1/readcd/readcd.1 cdrtools-3.01a26~trusty/readcd/readcd.1 --- cdrtools-3.00~trusty~mc3man1/readcd/readcd.1 2010-05-28 21:20:11.000000000 +0000 +++ cdrtools-3.01a26~trusty/readcd/readcd.1 2014-12-03 19:13:13.000000000 +0000 @@ -1,4 +1,4 @@ -.\" @(#)readcd.1 1.44 10/05/28 Copyright 1996-2010 J. Schilling +.\" @(#)readcd.1 1.45 14/12/03 Copyright 1996-2010 J. Schilling .\" .\" The contents of this file are subject to the terms of the .\" Common Development and Distribution License, Version 1.0 only @@ -6,6 +6,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. @@ -748,7 +750,7 @@ you may join the developer mailing list via this URL: .sp .B -http://lists.berlios.de/mailman/listinfo/cdrecord-developers +https://lists.sourceforge.net/lists/listinfo/cdrtools-developers .SH AUTHOR .nf @@ -760,17 +762,17 @@ .PP Additional information can be found on: .br -http://cdrecord.berlios.de/private/cdrecord.html +http://cdrecord.org/private/cdrecord.html .PP If you have support questions, send them to: .PP .B -cdrecord-support@berlios.de +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 @@ -779,11 +781,11 @@ 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 diff -Nru cdrtools-3.00~trusty~mc3man1/readcd/readcd.c cdrtools-3.01a26~trusty/readcd/readcd.c --- cdrtools-3.00~trusty~mc3man1/readcd/readcd.c 2010-05-11 20:18:04.000000000 +0000 +++ cdrtools-3.01a26~trusty/readcd/readcd.c 2015-01-01 14:21:00.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)readcd.c 1.111 10/05/11 Copyright 1987, 1995-2010 J. Schilling */ +/* @(#)readcd.c 1.126 15/01/01 Copyright 1987, 1995-2015 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)readcd.c 1.111 10/05/11 Copyright 1987, 1995-2010 J. Schilling"; + "@(#)readcd.c 1.126 15/01/01 Copyright 1987, 1995-2015 J. Schilling"; #endif /* * Skeleton for the use of the scg genearal SCSI - driver * - * Copyright (c) 1987, 1995-2010 J. Schilling + * Copyright (c) 1987, 1995-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -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. @@ -32,6 +34,7 @@ #include #include #include +#include #include #include /* for setmode() prototype */ @@ -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; @@ -273,44 +277,44 @@ 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(_("\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); } @@ -326,6 +330,9 @@ 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 +349,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; @@ -366,15 +401,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-2010 Jörg Schilling\n", + printf(_("readcd %s (%s-%s-%s) Copyright (C) 1987, 1995-2015 %s\n"), cdr_version, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Joerg Schilling")); exit(0); } @@ -387,7 +423,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 +432,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 +441,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,6 +450,32 @@ 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, &Sbufsize, NULL); @@ -458,7 +520,7 @@ scg_settarget(scgp, scsibus, target, lun); if (scg__open(scgp, NULL) <= 0) - comerr("Cannot open SCSI driver.\n"); + comerr(_("Cannot open SCSI driver.\n")); } scgp->silent = silent; scgp->verbose = verbose; @@ -470,30 +532,31 @@ 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 +569,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,9 +640,9 @@ 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); } } @@ -604,7 +667,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 || @@ -624,10 +687,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); } @@ -638,7 +701,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); @@ -656,16 +719,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); @@ -703,7 +766,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); } @@ -744,7 +807,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; @@ -757,7 +820,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)); } @@ -772,7 +835,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; @@ -814,10 +877,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) { @@ -826,7 +889,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) @@ -836,7 +899,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 @@ -886,16 +949,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; @@ -969,10 +1032,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; } @@ -1095,11 +1158,11 @@ 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 @@ -1123,7 +1186,7 @@ } } if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read full TOC\n"); + errmsgno(EX_BAD, _("Cannot read full TOC\n")); return (-1); } @@ -1131,7 +1194,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); @@ -1151,7 +1214,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); @@ -1169,15 +1232,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); } } @@ -1202,59 +1265,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 */ @@ -1301,10 +1364,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); } @@ -1326,7 +1391,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++; @@ -1340,7 +1405,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) { @@ -1354,7 +1419,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 */ @@ -1395,13 +1460,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); @@ -1427,7 +1492,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++; @@ -1441,7 +1506,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) { @@ -1452,9 +1517,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) @@ -1489,12 +1554,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); @@ -1575,7 +1640,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 */ @@ -1598,7 +1663,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 */ @@ -1610,6 +1675,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; @@ -1627,6 +1693,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; @@ -1635,11 +1702,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; @@ -1770,11 +1842,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) @@ -1944,11 +2016,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("."); @@ -1992,7 +2064,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 @@ -2007,7 +2079,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) @@ -2017,7 +2089,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; @@ -2025,7 +2097,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); } } @@ -2067,7 +2139,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) @@ -2082,14 +2154,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); } @@ -2107,22 +2179,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; } @@ -2134,7 +2206,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') @@ -2144,12 +2216,12 @@ f = stdout; setmode(STDOUT_FILENO, O_BINARY); } 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) @@ -2182,7 +2254,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(); @@ -2197,7 +2269,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) { @@ -2208,7 +2280,7 @@ } 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) { exargs.excode = -2; @@ -2217,7 +2289,7 @@ } 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 @@ -2232,23 +2304,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 @@ -2271,7 +2343,7 @@ 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) { @@ -2285,7 +2357,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)); @@ -2294,20 +2366,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);*/ } @@ -2318,11 +2390,11 @@ f = stdin; setmode(STDIN_FILENO, O_BINARY); } 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) @@ -2331,23 +2403,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)); } @@ -2389,7 +2461,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); @@ -2500,7 +2572,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); @@ -2832,12 +2904,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 */ @@ -2846,7 +2918,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) @@ -2872,12 +2944,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; @@ -2887,32 +2959,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); } @@ -2999,10 +3071,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); @@ -3021,10 +3093,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); @@ -3042,10 +3114,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); @@ -3070,13 +3142,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; } @@ -3089,8 +3161,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-3.00~trusty~mc3man1/README.compile cdrtools-3.01a26~trusty/README.compile --- cdrtools-3.00~trusty~mc3man1/README.compile 2010-05-15 16:06:27.000000000 +0000 +++ cdrtools-3.01a26~trusty/README.compile 2014-12-03 19:11:38.000000000 +0000 @@ -22,7 +22,7 @@ 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 @@ -48,19 +48,19 @@ 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 - Replace 'star' 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 @@ -106,8 +106,8 @@ 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 + 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. @@ -165,12 +165,13 @@ 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 is stored inside the + that compiles or links programs, as the path is stored inside the binaries. The location for the root specific configuratin files is controlled @@ -184,6 +185,41 @@ 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 in a different ELF RUNPATH: In order to allow binaries to work correctly even if the shared @@ -199,14 +235,14 @@ Using a different man path prefix: - Man Pages are by default installed under: + 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=soething install + smake DEFMANBASE=something install to install man pages into $(INS_BASE)/something/man/* @@ -255,13 +291,13 @@ smake DEFINSUMASK=002 install -Using a different C-compiler: +Using a different C compiler: 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. + 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 C-compiler can be modified in the files in the + The default C compiler can be modified in the files in the DEFAULT directory. If you want to have a different compiler for one compilation, call: @@ -320,7 +356,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: @@ -340,14 +376,14 @@ export MAKEPROG exec gmake "$@" - and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make' + and call 'Gmake' instead of gmake. On Linux, there is no gmake, '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: @@ -355,7 +391,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: @@ -366,7 +402,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 @@ -377,8 +413,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 @@ -397,15 +433,38 @@ make clean make COPTX=-g LDOPTX=-g + If your debugger does not like optimized binaries, call something + like: -Creting Blastwave packages: + make "COPTX=-g -xO0" LDOPTX=-g + or + make "COPTX=-g -O0" LDOPTX=-g + + depending on the option system of 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 + + depending on the option system of 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 @@ -417,7 +476,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 @@ -430,6 +489,112 @@ 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 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 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_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 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" + + + Author: Joerg Schilling @@ -438,6 +603,6 @@ Germany Email: joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de - joerg.schilling@fokus.fraunhufer.de + joerg.schilling@fokus.fraunhofer.de Please mail bugs and suggestions to me. diff -Nru cdrtools-3.00~trusty~mc3man1/READMEs/README.install cdrtools-3.01a26~trusty/READMEs/README.install --- cdrtools-3.00~trusty~mc3man1/READMEs/README.install 2008-10-12 18:11:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/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 diff -Nru cdrtools-3.00~trusty~mc3man1/READMEs/README.win32 cdrtools-3.01a26~trusty/READMEs/README.win32 --- cdrtools-3.00~trusty~mc3man1/READMEs/README.win32 2002-12-16 20:29:45.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/README.SSPM cdrtools-3.01a26~trusty/README.SSPM --- cdrtools-3.00~trusty~mc3man1/README.SSPM 2002-12-16 20:25:10.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/9000-725-hp-ux-cc64.rul cdrtools-3.01a26~trusty/RULES/9000-725-hp-ux-cc64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/9000-725-hp-ux-cc64.rul 2009-10-10 20:09:19.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/9000-725-hp-ux-cc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc64.rul 1.14 09/10/10 " -########################################################################### -# 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-hp64.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/9000-725-hp-ux-cc.rul cdrtools-3.01a26~trusty/RULES/9000-725-hp-ux-cc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/9000-725-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/bemac-beos-cc.rul cdrtools-3.01a26~trusty/RULES/bemac-beos-cc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/bemac-beos-cc.rul 2007-05-08 11:07:57.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/bemac-beos-mwcc.rul cdrtools-3.01a26~trusty/RULES/bemac-beos-mwcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/bemac-beos-mwcc.rul 2007-05-08 11:07:57.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/cc-apollo.rul cdrtools-3.01a26~trusty/RULES/cc-apollo.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-apollo.rul 2010-05-15 14:30:51.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-apollo.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-apollo.rul 1.9 10/05/15 " +#ident "@(#)cc-apollo.rul 1.14 13/11/13 " ########################################################################### -# Written 2001-2006 by J. Schilling +# Written 2001-2013 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 @@ -53,9 +55,21 @@ 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; : +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 @@ -67,13 +81,8 @@ 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-3.00~trusty~mc3man1/RULES/cc-bemwcc.rul cdrtools-3.01a26~trusty/RULES/cc-bemwcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-bemwcc.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-bemwcc.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident @(#)cc-bemwcc.rul 1.9 07/05/08 +#ident @(#)cc-bemwcc.rul 1.14 13/11/13 ########################################################################### -# Written 1996-2006 by J. Schilling +# Written 1996-2013 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 @@ -80,8 +82,20 @@ 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; : +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 +103,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-3.00~trusty~mc3man1/RULES/cc-clang.rul cdrtools-3.01a26~trusty/RULES/cc-clang.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-clang.rul 2014-03-25 14:51:00.000000000 +0000 @@ -0,0 +1,88 @@ +#ident "@(#)cc-clang.rul 1.1 14/03/25 " +########################################################################### +# 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 + +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-3.00~trusty~mc3man1/RULES/cc-dec.rul cdrtools-3.01a26~trusty/RULES/cc-dec.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-dec.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-dec.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-dec.rul 1.7 07/05/08 " +#ident "@(#)cc-dec.rul 1.13 13/11/13 " ########################################################################### -# Written 1998-2006 by J. Schilling +# Written 1998-2013 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 @@ -52,21 +54,29 @@ 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; : +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-3.00~trusty~mc3man1/RULES/cc-dg.rul cdrtools-3.01a26~trusty/RULES/cc-dg.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-dg.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-dg.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-dg.rul 1.7 07/05/08 " +#ident "@(#)cc-dg.rul 1.13 13/11/13 " ########################################################################### -# Written 1996-2006 by J. Schilling +# Written 1996-2013 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 @@ -50,22 +52,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= echo "C++ not yet supported"; exit -1; : +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-3.00~trusty~mc3man1/RULES/cc-dumb.rul cdrtools-3.01a26~trusty/RULES/cc-dumb.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-dumb.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-dumb.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-dumb.rul 1.7 07/05/08 " +#ident "@(#)cc-dumb.rul 1.13 13/11/13 " ########################################################################### -# Written 1997-2006 by J. Schilling +# Written 1997-2013 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= # @@ -55,22 +57,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= echo "C++ not yet supported"; exit -1; : +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-3.00~trusty~mc3man1/RULES/cc-gcc32.rul cdrtools-3.01a26~trusty/RULES/cc-gcc32.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-gcc32.rul 2010-05-04 20:51:22.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-gcc32.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -#ident "@(#)cc-gcc32.rul 1.12 10/05/04 " -########################################################################### -# Written 1996-2010 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. -########################################################################### - -GCC_OPT32= -m32 - -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= $(GCC_OPT32) -# -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= $(GCC_OPT32) -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 $(GCC_OPT32) -CC++ = @echo " ==> COMPILING \"$@\""; g++ $(GCC_OPT32) -LDCC= @echo " ==> LINKING \"$@\""; gcc $(GCC_OPT32) -LDCC++ = @echo " ==> LINKING \"$@\""; g++ $(GCC_OPT32) -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; gcc $(GCC_OPT32) -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; g++ $(GCC_OPT32) - -RMDEP= : -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); gcc $(GCC_OPT32) -M -MKDEP_OUT= -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); g++ $(GCC_OPT32) -M -MKC++DEP_OUT= diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/cc-gcc64.rul cdrtools-3.01a26~trusty/RULES/cc-gcc64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-gcc64.rul 2009-11-29 13:57:59.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-gcc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -#ident "@(#)cc-gcc64.rul 1.11 09/11/29 " -########################################################################### -# 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. -########################################################################### - -GCC_OPT64= -m64 - -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= $(GCC_OPT64) -# -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= $(GCC_OPT64) -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 $(GCC_OPT64) -CC++ = @echo " ==> COMPILING \"$@\""; g++ $(GCC_OPT64) -LDCC= @echo " ==> LINKING \"$@\""; gcc $(GCC_OPT64) -LDCC++ = @echo " ==> LINKING \"$@\""; g++ $(GCC_OPT64) -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; gcc $(GCC_OPT64) -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; g++ $(GCC_OPT64) - -RMDEP= : -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); gcc $(GCC_OPT64) -M -MKDEP_OUT= -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); g++ $(GCC_OPT64) -M -MKC++DEP_OUT= diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/cc-gcc.rul cdrtools-3.01a26~trusty/RULES/cc-gcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-gcc.rul 2014-03-31 15:52:08.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-gcc.rul 1.9 07/05/09 " +#ident "@(#)cc-gcc.rul 1.16 14/03/31 " ########################################################################### -# 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 @@ -54,15 +61,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-3.00~trusty~mc3man1/RULES/cc-hp64.rul cdrtools-3.01a26~trusty/RULES/cc-hp64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-hp64.rul 2009-10-12 19:49:31.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-hp64.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-hp64.rul 1.9 09/10/12 " +#ident "@(#)cc-hp64.rul 1.15 13/11/13 " ########################################################################### -# Written 1996-2006 by J. Schilling +# Written 1996-2013 by J. Schilling ########################################################################### # # Platform dependent MACROS for HP/UC 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) $(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 @@ -61,22 +63,29 @@ FLOAT_OPTIONS= -CC_COM= cc -CC= @echo " ==> COMPILING \"$@\""; cc +DD64 -LDCC= @echo " ==> LINKING \"$@\""; cc +DD64 -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; cc +DD64 +__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; : +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 -#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-3.00~trusty~mc3man1/RULES/cc-hp.rul cdrtools-3.01a26~trusty/RULES/cc-hp.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-hp.rul 2009-01-07 18:20:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-hp.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-hp.rul 1.7 09/01/07 " +#ident "@(#)cc-hp.rul 1.13 13/11/13 " ########################################################################### -# Written 1996-2006 by J. Schilling +# Written 1996-2013 by J. Schilling ########################################################################### # # Platform dependent MACROS for HP/UC 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) $(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 @@ -60,21 +62,29 @@ 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; : +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); $(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) +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM); echo "Cannot do -M with unknown CC"; : MKC++DEP_OUT= diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/cc-ibm.rul cdrtools-3.01a26~trusty/RULES/cc-ibm.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-ibm.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-ibm.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-ibm.rul 1.6 07/05/08 " +#ident "@(#)cc-ibm.rul 1.12 13/11/13 " ########################################################################### -# Written 1996-2006 by J. Schilling +# Written 1996-2013 by J. Schilling ########################################################################### # # Platform dependent MACROS for IBM AIX 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) $(IBMCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(IBMC++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 @@ -52,8 +54,21 @@ 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; : +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld RMDEP= : @@ -61,17 +76,12 @@ 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) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM); # mkdep-aix.sh? MKC++DEP_OUT= diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/cc-msc.rul cdrtools-3.01a26~trusty/RULES/cc-msc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-msc.rul 2009-05-21 11:06:39.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-msc.rul 2014-04-03 09:34:16.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-msc.rul 1.18 09/05/21 " +#ident "@(#)cc-msc.rul 1.26 14/04/03 " ########################################################################### -# 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 @@ -51,8 +53,10 @@ 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) @@ -63,16 +67,28 @@ 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 @@ -100,3 +116,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-3.00~trusty~mc3man1/RULES/cc-msposix.rul cdrtools-3.01a26~trusty/RULES/cc-msposix.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-msposix.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-msposix.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-msposix.rul 1.18 07/05/08 " +#ident "@(#)cc-msposix.rul 1.23 13/11/13 " ########################################################################### -# 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 @@ -60,8 +62,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-3.00~trusty~mc3man1/RULES/cc-openvms.rul cdrtools-3.01a26~trusty/RULES/cc-openvms.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-openvms.rul 2009-11-05 21:47:20.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-openvms.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-openvms.rul 1.3 09/11/05 " +#ident "@(#)cc-openvms.rul 1.9 13/11/13 " ########################################################################### -# Written 1998-2009 by J. Schilling +# Written 1998-2013 by J. Schilling ########################################################################### # # Platform dependent MACROS for GNV OpenVMS 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= -verbose COPTOPT= -O @@ -52,23 +54,32 @@ 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; : +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 -M +#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 -#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= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM); echo "Cannot yet do -M with OpenVMS CC"; : MKC++DEP_OUT= diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/cc-pcc.rul cdrtools-3.01a26~trusty/RULES/cc-pcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-pcc.rul 2010-02-23 11:20:35.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-pcc.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-pcc.rul 1.1 10/02/23 " +#ident "@(#)cc-pcc.rul 1.7 13/11/13 " ########################################################################### -# Written 2010 by J. Schilling +# Written 2010-2013 by J. Schilling ########################################################################### # # Platform independent MACROS for PCC @@ -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) $(GCCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(G++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) COPTS= # -Wtraditional now causes more pain than it helps #*CWOPTS= -Wall -Wtraditional @@ -54,16 +56,28 @@ FLOAT_OPTIONS= -CC_COM= pcc -CC= @echo " ==> COMPILING \"$@\""; pcc -CC++ = @echo " ==> COMPILING \"$@\""; p++ -LDCC= @echo " ==> LINKING \"$@\""; pcc -LDCC++ = @echo " ==> LINKING \"$@\""; p++ -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; pcc -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; p++ +__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); pcc -M +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M MKDEP_OUT= -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); p++ -M +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -M MKC++DEP_OUT= diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/cc-sco_os.rul cdrtools-3.01a26~trusty/RULES/cc-sco_os.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-sco_os.rul 2010-05-15 14:30:51.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-sco_os.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-sco_os.rul 1.9 10/05/15 " +#ident "@(#)cc-sco_os.rul 1.15 13/11/13 " ########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation +# Written 1999-2013 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 @@ -51,9 +53,22 @@ 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; : +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= : @@ -62,13 +77,8 @@ 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-3.00~trusty~mc3man1/RULES/cc-sco_uw.rul cdrtools-3.01a26~trusty/RULES/cc-sco_uw.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-sco_uw.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-sco_uw.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-sco_uw.rul 1.7 07/05/08 " +#ident "@(#)cc-sco_uw.rul 1.13 13/11/13 " ########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation +# Written 1999-2013 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 @@ -52,23 +54,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= echo "C++ not yet supported"; exit -1; : +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= -#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-3.00~trusty~mc3man1/RULES/cc-sgi64.rul cdrtools-3.01a26~trusty/RULES/cc-sgi64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-sgi64.rul 2009-11-29 12:03:46.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-sgi64.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-sgi64.rul 1.7 09/11/29 " +#ident "@(#)cc-sgi64.rul 1.13 13/11/13 " ########################################################################### -# 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= -64 CWOPTS= -fullwarn COPTOPT= -O @@ -52,18 +54,30 @@ FLOAT_OPTIONS= -CC_COM= cc -CC= @echo " ==> COMPILING \"$@\""; cc -64 -LDCC= @echo " ==> LINKING \"$@\""; cc -64 -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; cc -64 +__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 -64 -M +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -64 -M MKDEP_OUT= -CC++ = @echo " ==> COMPILING \"$@\""; CC -64 -LDCC++ = @echo " ==> LINKING \"$@\""; CC -64 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC -64 -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -64 -M +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-3.00~trusty~mc3man1/RULES/cc-sgi.rul cdrtools-3.01a26~trusty/RULES/cc-sgi.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-sgi.rul 2009-11-29 12:03:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-sgi.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-sgi.rul 1.7 09/11/29 " +#ident "@(#)cc-sgi.rul 1.13 13/11/13 " ########################################################################### -# 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 @@ -52,17 +54,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 -M +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-3.00~trusty~mc3man1/RULES/cc-sony.rul cdrtools-3.01a26~trusty/RULES/cc-sony.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-sony.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-sony.rul 2013-11-13 19:31:03.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.12 13/11/13 +########################################################################### +# Written 1996-2013 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 @@ -51,22 +54,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= echo "C++ not yet supported"; exit -1; : +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-3.00~trusty~mc3man1/RULES/cc-sunpro64.rul cdrtools-3.01a26~trusty/RULES/cc-sunpro64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-sunpro64.rul 2009-01-06 22:07:12.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-sunpro64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -#ident "@(#)cc-sunpro64.rul 1.11 09/01/06 " -########################################################################### -# Written 1996-2009 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 - -_SUNPROCOPT64= $(_UNIQ)$(SUN_CC64_OPT) -__SUNPROCOPT64= $(_SUNPROCOPT64:$(_UNIQ)=-xarch=generic64) -SUNPROCOPT64= $(__SUNPROCOPT64:$(_UNIQ)%=%) - -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) -COPTS= -Xa $(SUNPROCOPT64) -CWOPTS= -v -COPTOPT= -O -COPTDYN= -Kpic -COPTGPROF= -xpg -C++OPTS= $(SUNPROCOPT64) -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) $(SUNPROCOPT64) -CC++ = @echo " ==> COMPILING \"$@\""; CC $(SUNPROCOPT64) -LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) $(SUNPROCOPT64) -LDCC++ = @echo " ==> LINKING \"$@\""; CC $(SUNPROCOPT64) -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) $(SUNPROCOPT64) -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC $(SUNPROCOPT64) - -RMDEP= : -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -xM $(SUNPROCOPT64) -MKDEP_OUT= -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM $(SUNPROCOPT64) -MKC++DEP_OUT= diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/cc-sunpro.rul cdrtools-3.01a26~trusty/RULES/cc-sunpro.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-sunpro.rul 2007-06-13 22:20:07.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-sunpro.rul 2014-03-28 16:42:21.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-sunpro.rul 1.8 07/06/14 " +#ident "@(#)cc-sunpro.rul 1.16 14/03/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 @@ -48,22 +67,40 @@ 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-3.00~trusty~mc3man1/RULES/cc-sun.rul cdrtools-3.01a26~trusty/RULES/cc-sun.rul --- cdrtools-3.00~trusty~mc3man1/RULES/cc-sun.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/cc-sun.rul 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-sun.rul 1.6 07/05/08 " +#ident "@(#)cc-sun.rul 1.12 13/11/13 " ########################################################################### -# Written 1996-2006 by J. Schilling +# Written 1996-2013 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 @@ -52,22 +54,30 @@ 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; : +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-3.00~trusty~mc3man1/RULES/gmake.wrn cdrtools-3.01a26~trusty/RULES/gmake.wrn --- cdrtools-3.00~trusty~mc3man1/RULES/gmake.wrn 2009-08-17 20:41:28.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/gmake.wrn 2014-12-03 21:15:05.000000000 +0000 @@ -18,6 +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-3.00~trusty~mc3man1/RULES/hppa-nextstep-cc.rul cdrtools-3.01a26~trusty/RULES/hppa-nextstep-cc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/hppa-nextstep-cc.rul 2010-05-15 14:30:51.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/hppa-nextstep-cc.rul 2013-07-22 21:27:11.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)hppa-nextstep-cc.rul 1.11 10/05/15 " +#ident "@(#)hppa-nextstep-cc.rul 1.13 13/07/22 " ########################################################################### -# Written 1996 by J. Schilling +# Written 1996-2013 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 += @@ -44,10 +47,3 @@ MKDIR= $(MKDIR_SH) INSMKDIR= $(INSMKDIR_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-3.00~trusty~mc3man1/RULES/i386-bsd-os3-cc.rul cdrtools-3.01a26~trusty/RULES/i386-bsd-os3-cc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i386-bsd-os3-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i386-bsd-os3-gcc.rul cdrtools-3.01a26~trusty/RULES/i386-bsd-os3-gcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i386-bsd-os3-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i386-bsd-os-cc.rul cdrtools-3.01a26~trusty/RULES/i386-bsd-os-cc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i386-bsd-os-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i386-bsd-os-gcc.rul cdrtools-3.01a26~trusty/RULES/i386-bsd-os-gcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i386-bsd-os-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i386-darwin-clang.rul cdrtools-3.01a26~trusty/RULES/i386-darwin-clang.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i386-darwin-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i386-freebsd-clang.rul cdrtools-3.01a26~trusty/RULES/i386-freebsd-clang.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i386-freebsd-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i386-mingw32_nt-gcc.rul cdrtools-3.01a26~trusty/RULES/i386-mingw32_nt-gcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i386-mingw32_nt-gcc.rul 2010-05-15 14:30:51.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/i386-mingw32_nt-gcc.rul 2014-04-03 09:34:16.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i386-mingw32_nt-gcc.rul 1.8 10/05/15 " +#ident "@(#)i386-mingw32_nt-gcc.rul 1.12 14/04/03 " ########################################################################### # # 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,8 +35,9 @@ 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) diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/i386-openserver-cc.rul cdrtools-3.01a26~trusty/RULES/i386-openserver-cc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i386-openserver-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i486-cygwin32_nt-cc64.rul cdrtools-3.01a26~trusty/RULES/i486-cygwin32_nt-cc64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i486-cygwin32_nt-cc64.rul 2009-07-27 21:10:42.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/i486-cygwin32_nt-cc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#ident "@(#)i486-cygwin32_nt-cc64.rul 1.1 09/07/27 " -########################################################################### -# Written 2009 by J. Schilling -########################################################################### -# -# 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-gcc64.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-3.00~trusty~mc3man1/RULES/i486-cygwin32_nt-cc.rul cdrtools-3.01a26~trusty/RULES/i486-cygwin32_nt-cc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i486-cygwin32_nt-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/i486-cygwin32_nt-cc.rul 2014-04-01 12:35:28.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)i486-cygwin32_nt-cc.rul 1.10 07/05/09 " +#ident "@(#)i486-cygwin32_nt-cc.rul 1.11 14/04/01 " ########################################################################### -# 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 diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/i486-cygwin32_nt-gcc64.rul cdrtools-3.01a26~trusty/RULES/i486-cygwin32_nt-gcc64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i486-cygwin32_nt-gcc64.rul 2009-07-27 21:10:42.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/i486-cygwin32_nt-gcc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#ident "@(#)i486-cygwin32_nt-gcc64.rul 1.1 09/07/27 " -########################################################################### -# Written 2009 by J. Schilling -########################################################################### -# -# 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-gcc64.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-3.00~trusty~mc3man1/RULES/i486-cygwin32_nt-gcc.rul cdrtools-3.01a26~trusty/RULES/i486-cygwin32_nt-gcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i486-cygwin32_nt-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/i486-cygwin32_nt-gcc.rul 2014-04-01 12:35:28.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)i486-cygwin32_nt-gcc.rul 1.10 07/05/09 " +#ident "@(#)i486-cygwin32_nt-gcc.rul 1.11 14/04/01 " ########################################################################### -# 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 diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/i486-mingw32_nt-gcc.rul cdrtools-3.01a26~trusty/RULES/i486-mingw32_nt-gcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i486-mingw32_nt-gcc.rul 2010-05-15 14:30:51.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/i486-mingw32_nt-gcc.rul 2014-04-03 09:34:16.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i486-mingw32_nt-gcc.rul 1.8 10/05/15 " +#ident "@(#)i486-mingw32_nt-gcc.rul 1.11 14/04/03 " ########################################################################### # # 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,7 +35,9 @@ LIB_MATH= -lm LIB_KVM= -LDLIBS= $(LIBS) $(LIBX) -lmgw32 +WIN_LIBS= $(WIN32_LIBS) + +LDLIBS= $(LIBS) $(LIBX) $(WIN_LIBS) -lmingw32 LDOPTS= $(LIBS_PATH) $(LDPATH) diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/i586-linux-clang.rul cdrtools-3.01a26~trusty/RULES/i586-linux-clang.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i586-linux-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i586-linux-suncc64.rul cdrtools-3.01a26~trusty/RULES/i586-linux-suncc64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i586-linux-suncc64.rul 2008-11-15 12:21:13.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/i586-linux-suncc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -#ident "@(#)i586-linux-suncc64.rul 1.4 08/11/15 " -########################################################################### -# 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-sunpro64.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%) -# -# 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-3.00~trusty~mc3man1/RULES/i586-linux-suncc.rul cdrtools-3.01a26~trusty/RULES/i586-linux-suncc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i586-linux-suncc.rul 2008-11-15 12:21:13.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/i586-linux-suncc.rul 2014-04-01 11:59:09.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)i586-linux-suncc.rul 1.3 08/11/15 " +#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 diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/i586-mingw32_nt-gcc.rul cdrtools-3.01a26~trusty/RULES/i586-mingw32_nt-gcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i586-mingw32_nt-gcc.rul 2010-05-15 14:30:51.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/i586-mingw32_nt-gcc.rul 2014-04-03 09:34:16.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i586-mingw32_nt-gcc.rul 1.8 10/05/15 " +#ident "@(#)i586-mingw32_nt-gcc.rul 1.11 14/04/03 " ########################################################################### # # 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,7 +35,9 @@ LIB_MATH= -lm LIB_KVM= -LDLIBS= $(LIBS) $(LIBX) -lmgw32 +WIN_LIBS= $(WIN32_LIBS) + +LDLIBS= $(LIBS) $(LIBX) $(WIN_LIBS) -lmingw32 LDOPTS= $(LIBS_PATH) $(LDPATH) diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/i586-pyro-cc.rul cdrtools-3.01a26~trusty/RULES/i586-pyro-cc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i586-pyro-cc.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i586-pyro-gcc.rul cdrtools-3.01a26~trusty/RULES/i586-pyro-gcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i586-pyro-gcc.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i686-mingw32_nt-gcc.rul cdrtools-3.01a26~trusty/RULES/i686-mingw32_nt-gcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i686-mingw32_nt-gcc.rul 2010-05-15 14:30:51.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/i686-mingw32_nt-gcc.rul 2014-04-03 09:34:16.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i686-mingw32_nt-gcc.rul 1.8 10/05/15 " +#ident "@(#)i686-mingw32_nt-gcc.rul 1.11 14/04/03 " ########################################################################### # # 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,7 +35,9 @@ LIB_MATH= -lm LIB_KVM= -LDLIBS= $(LIBS) $(LIBX) -lmgw32 +WIN_LIBS= $(WIN32_LIBS) + +LDLIBS= $(LIBS) $(LIBX) $(WIN_LIBS) -lmingw32 LDOPTS= $(LIBS_PATH) $(LDPATH) diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/i786-mingw32_nt-gcc.rul cdrtools-3.01a26~trusty/RULES/i786-mingw32_nt-gcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i786-mingw32_nt-gcc.rul 2010-05-15 14:30:51.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/i786-mingw32_nt-gcc.rul 2014-04-03 09:34:16.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i786-mingw32_nt-gcc.rul 1.8 10/05/15 " +#ident "@(#)i786-mingw32_nt-gcc.rul 1.11 14/04/03 " ########################################################################### # # 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,7 +35,9 @@ LIB_MATH= -lm LIB_KVM= -LDLIBS= $(LIBS) $(LIBX) -lmgw32 +WIN_LIBS= $(WIN32_LIBS) + +LDLIBS= $(LIBS) $(LIBX) $(WIN_LIBS) -lmingw32 LDOPTS= $(LIBS_PATH) $(LDPATH) diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/i86pc-sunos5-cc64.rul cdrtools-3.01a26~trusty/RULES/i86pc-sunos5-cc64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i86pc-sunos5-cc64.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i86pc-sunos5-cc.rul cdrtools-3.01a26~trusty/RULES/i86pc-sunos5-cc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i86pc-sunos5-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i86pc-sunos5-clang.rul cdrtools-3.01a26~trusty/RULES/i86pc-sunos5-clang.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i86pc-sunos5-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i86pc-sunos5-gcc64.rul cdrtools-3.01a26~trusty/RULES/i86pc-sunos5-gcc64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i86pc-sunos5-gcc64.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i86pc-sunos5-gcc.rul cdrtools-3.01a26~trusty/RULES/i86pc-sunos5-gcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i86pc-sunos5-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/i86pc-sunos5-pcc.rul cdrtools-3.01a26~trusty/RULES/i86pc-sunos5-pcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/i86pc-sunos5-pcc.rul 2010-02-28 20:29:40.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/i86pc-sunos5-pcc.rul 2013-01-09 19:06:19.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)i86pc-sunos5-pcc.rul 1.1 10/02/28 " +#ident "@(#)i86pc-sunos5-pcc.rul 1.3 13/01/09 " ########################################################################### -# Written 2010 by J. Schilling +# Written 2010-2013 by J. Schilling ########################################################################### # # Platform dependent MACROS for SunOS 5.x for PC @@ -21,7 +21,6 @@ include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### include $(SRCROOT)/$(RULESDIR)/cc-pcc.rul -CC_COM= pcc OSDEFS += -D__SVR4 -DSVR4 KDEFINES= -DKERNEL -D_KERNEL @@ -31,6 +30,11 @@ LIB_KVM= -lkvm -lelf LIB_VOLMGT= -lvolmgt -LDOPTDYN= -dy -G -Wl,-ztext -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl +# +# 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-3.00~trusty~mc3man1/RULES/ip22-irix-cc64.rul cdrtools-3.01a26~trusty/RULES/ip22-irix-cc64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/ip22-irix-cc64.rul 2009-11-29 14:56:32.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/ip22-irix-cc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#ident "@(#)ip22-irix-cc64.rul 1.10 09/11/29 " -########################################################################### -# 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-sgi64.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-3.00~trusty~mc3man1/RULES/ip22-irix-cc.rul cdrtools-3.01a26~trusty/RULES/ip22-irix-cc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/ip22-irix-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/ip22-irix-gcc.rul cdrtools-3.01a26~trusty/RULES/ip22-irix-gcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/ip22-irix-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/ip22-irix-gcc.rul 2014-04-01 12:30:33.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)ip22-irix-gcc.rul 1.11 07/05/09 " +#ident "@(#)ip22-irix-gcc.rul 1.12 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 diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/local.cnf cdrtools-3.01a26~trusty/RULES/local.cnf --- cdrtools-3.00~trusty~mc3man1/RULES/local.cnf 2008-08-01 18:04:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/local.cnf 2014-04-03 12:18:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident @(#)local.cnf 1.9 08/08/01 +#ident @(#)local.cnf 1.11 14/04/03 ########################################################################### -# Written 1998 by J. Schilling +# Written 1998-2014 by J. Schilling ########################################################################### # # Make Rules for local dynamic configuration @@ -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. @@ -37,8 +39,8 @@ RUL_LCONF= @echo " ==> CONFIGURING LOCAL RULES \"$@\""; $(RM_F) $@; \ 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-3.00~trusty~mc3man1/RULES/mk-gmake.id cdrtools-3.01a26~trusty/RULES/mk-gmake.id --- cdrtools-3.00~trusty~mc3man1/RULES/mk-gmake.id 2009-09-09 12:29:28.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/mk-gmake.id 2012-12-29 14:44:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)mk-gmake.id 1.22 09/09/09 " +#ident "@(#)mk-gmake.id 1.24 12/12/29 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -27,6 +27,12 @@ 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%=%) ########################################################################### # diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/mk-.id cdrtools-3.01a26~trusty/RULES/mk-.id --- cdrtools-3.00~trusty~mc3man1/RULES/mk-.id 2009-09-09 12:28:54.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/mk-.id 2012-12-29 14:44:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)mk-.id 1.16 09/09/09 " +#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\%=%) ########################################################################### # diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/MKLINKS cdrtools-3.01a26~trusty/RULES/MKLINKS --- cdrtools-3.00~trusty~mc3man1/RULES/MKLINKS 2010-05-11 21:32:48.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/MKLINKS 2014-06-05 22:12:13.000000000 +0000 @@ -1,10 +1,10 @@ #!/bin/sh ########################################################################### -#ident "@(#)MKLINKS 1.88 10/05/11 " +#ident "@(#)MKLINKS 1.118 14/06/06 " ########################################################################### -# Written 1996 by J. Schilling +# Written 1996-2014 by J. Schilling ########################################################################### -# Copyright (c) 1996-2009 J. Schilling +# Copyright (c) 1996-2014 J. Schilling ########################################################################### # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only @@ -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. @@ -23,16 +25,44 @@ fi ########################################################################### symlink="ln -s" -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 -rm -f xxzzy.123 xxzzy.345 +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 +# +$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 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 + +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 @@ -88,6 +118,8 @@ $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 +#$symlink ip22-irix-gcc.rul ip22-irix-gcc64.rul does not work because of GCC_OPT64= -mabi=64 $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 @@ -119,7 +151,14 @@ $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-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 @@ -136,11 +175,15 @@ $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 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 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 i386-linux-gcc.rul @@ -154,10 +197,16 @@ $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 @@ -166,6 +215,8 @@ $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 @@ -173,9 +224,22 @@ $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 sh3-linux-cc.rul $symlink i586-linux-gcc.rul sh3-linux-gcc.rul $symlink i586-linux-cc.rul sh4-linux-cc.rul @@ -186,12 +250,28 @@ $symlink i586-linux-gcc32.rul sparc64-linux-gcc32.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-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 @@ -201,6 +281,8 @@ #$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-cc64.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 @@ -227,12 +309,39 @@ $symlink i486-cygwin32_nt-gcc64.rul i786-cygwin32_wow64-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-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 @@ -284,16 +393,3 @@ $symlink bepc-haiku-cc.rul bemac-haiku-cc.rul $symlink bepc-haiku-gcc.rul bemac-haiku-gcc.rul $symlink alpha-openvms-cc.rul alphaserver_ds20_500_mhz-openvms-cc.rul -# -$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 - -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 diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/mk-smake.id cdrtools-3.01a26~trusty/RULES/mk-smake.id --- cdrtools-3.00~trusty~mc3man1/RULES/mk-smake.id 2009-08-12 21:15:59.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/mk-smake.id 2012-12-29 14:44:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)mk-smake.id 1.7 09/08/12 " +#ident "@(#)mk-smake.id 1.10 12/12/29 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -27,6 +27,10 @@ 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 ########################################################################### # @@ -61,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-3.00~trusty~mc3man1/RULES/os-cygwin_nt-6.2.id cdrtools-3.01a26~trusty/RULES/os-cygwin_nt-6.2.id --- cdrtools-3.00~trusty~mc3man1/RULES/os-cygwin_nt-6.2.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/os-cygwin_nt-6.2-wow64.id cdrtools-3.01a26~trusty/RULES/os-cygwin_nt-6.2-wow64.id --- cdrtools-3.00~trusty~mc3man1/RULES/os-cygwin_nt-6.2-wow64.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/os-cygwin_nt-6.3.id cdrtools-3.01a26~trusty/RULES/os-cygwin_nt-6.3.id --- cdrtools-3.00~trusty~mc3man1/RULES/os-cygwin_nt-6.3.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/os-cygwin_nt-6.3-wow64.id cdrtools-3.01a26~trusty/RULES/os-cygwin_nt-6.3-wow64.id --- cdrtools-3.00~trusty~mc3man1/RULES/os-cygwin_nt-6.3-wow64.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/os-gnu-kfreebsd.def cdrtools-3.01a26~trusty/RULES/os-gnu-kfreebsd.def --- cdrtools-3.00~trusty~mc3man1/RULES/os-gnu-kfreebsd.def 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/os-gnu-kfreebsd.id cdrtools-3.01a26~trusty/RULES/os-gnu-kfreebsd.id --- cdrtools-3.00~trusty~mc3man1/RULES/os-gnu-kfreebsd.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/os-interix-nt-6.0.id cdrtools-3.01a26~trusty/RULES/os-interix-nt-6.0.id --- cdrtools-3.00~trusty~mc3man1/RULES/os-interix-nt-6.0.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/os-interix-nt-6.1.id cdrtools-3.01a26~trusty/RULES/os-interix-nt-6.1.id --- cdrtools-3.00~trusty~mc3man1/RULES/os-interix-nt-6.1.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/os-mingw32_nt.def cdrtools-3.01a26~trusty/RULES/os-mingw32_nt.def --- cdrtools-3.00~trusty~mc3man1/RULES/os-mingw32_nt.def 2006-05-14 11:55:27.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/os-pyro.def cdrtools-3.01a26~trusty/RULES/os-pyro.def --- cdrtools-3.00~trusty~mc3man1/RULES/os-pyro.def 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/os-pyro.id cdrtools-3.01a26~trusty/RULES/os-pyro.id --- cdrtools-3.00~trusty~mc3man1/RULES/os-pyro.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/power-macintosh-darwin-cc32.rul cdrtools-3.01a26~trusty/RULES/power-macintosh-darwin-cc32.rul --- cdrtools-3.00~trusty~mc3man1/RULES/power-macintosh-darwin-cc32.rul 2010-05-04 20:51:22.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/power-macintosh-darwin-cc32.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -#ident "@(#)power-macintosh-darwin-cc32.rul 1.4 10/05/04 " -########################################################################### -# 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-gcc32.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%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation -LDOPTDYN= -install_name $(INSBASE)/lib/$(TARGET) -LDLIBDYN= -lgcc -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 - -#### -# XXX Better use something like CC=cc -#### -CC= @echo " ==> COMPILING \"$@\""; cc $(GCC_OPT32) -LDCC= @echo " ==> LINKING \"$@\""; cc $(GCC_OPT32) -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc $(GCC_OPT32) -M diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/power-macintosh-darwin-cc64.rul cdrtools-3.01a26~trusty/RULES/power-macintosh-darwin-cc64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/power-macintosh-darwin-cc64.rul 2010-05-04 20:50:32.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/power-macintosh-darwin-cc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -#ident "@(#)power-macintosh-darwin-cc64.rul 1.4 10/05/04 " -########################################################################### -# 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-gcc64.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%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation -LDOPTDYN= -install_name $(INSBASE)/lib/$(TARGET) -LDLIBDYN= -lgcc -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 - -#### -# XXX Better use something like CC=cc -#### -CC= @echo " ==> COMPILING \"$@\""; cc $(GCC_OPT64) -LDCC= @echo " ==> LINKING \"$@\""; cc $(GCC_OPT64) -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc $(GCC_OPT64) -M diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/power-macintosh-darwin-cc.rul cdrtools-3.01a26~trusty/RULES/power-macintosh-darwin-cc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/power-macintosh-darwin-cc.rul 2009-07-28 22:14:48.000000000 +0000 +++ cdrtools-3.01a26~trusty/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.16 09/07/29 " +#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,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:cc%=gcc%).rul +CC_COM_DEF= cc OSDEFS += @@ -38,9 +41,10 @@ LIB_KVM= #LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation +LDFRAMEWORKS= -framework IOKit -framework CoreFoundation +LDOPTS= $(LIBS_PATH) $(LDPATH) $(LDFRAMEWORKS) LDOPTDYN= -install_name $(INSBASE)/lib/$(TARGET) -LDLIBDYN= -lgcc +LDLIBDYN= -lgcc_s.1 LNDYNLIB= @ DYNLD= @echo " ==> LINKING dynamic library \"$@\""; libtool -dynamic @@ -58,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-3.00~trusty~mc3man1/RULES/power-macintosh-darwin-gcc32.rul cdrtools-3.01a26~trusty/RULES/power-macintosh-darwin-gcc32.rul --- cdrtools-3.00~trusty~mc3man1/RULES/power-macintosh-darwin-gcc32.rul 2010-05-04 20:51:22.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/power-macintosh-darwin-gcc32.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -#ident "@(#)power-macintosh-darwin-gcc32.rul 1.4 10/05/04 " -########################################################################### -# 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-gcc32.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%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation -LDOPTDYN= -install_name $(INSBASE)/lib/$(TARGET) -LDLIBDYN= -lgcc -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-3.00~trusty~mc3man1/RULES/power-macintosh-darwin-gcc64.rul cdrtools-3.01a26~trusty/RULES/power-macintosh-darwin-gcc64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/power-macintosh-darwin-gcc64.rul 2009-07-28 22:14:48.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/power-macintosh-darwin-gcc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -#ident "@(#)power-macintosh-darwin-gcc64.rul 1.3 09/07/29 " -########################################################################### -# 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-gcc64.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%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation -LDOPTDYN= -install_name $(INSBASE)/lib/$(TARGET) -LDLIBDYN= -lgcc -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-3.00~trusty~mc3man1/RULES/power-macintosh-darwin-gcc.rul cdrtools-3.01a26~trusty/RULES/power-macintosh-darwin-gcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/power-macintosh-darwin-gcc.rul 2009-07-28 22:14:48.000000000 +0000 +++ cdrtools-3.01a26~trusty/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.16 09/07/29 " +#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,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 += @@ -38,9 +40,10 @@ LIB_KVM= #LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation +LDFRAMEWORKS= -framework IOKit -framework CoreFoundation +LDOPTS= $(LIBS_PATH) $(LDPATH) $(LDFRAMEWORKS) LDOPTDYN= -install_name $(INSBASE)/lib/$(TARGET) -LDLIBDYN= -lgcc +LDLIBDYN= -lgcc_s.1 LNDYNLIB= @ DYNLD= @echo " ==> LINKING dynamic library \"$@\""; libtool -dynamic diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/power-macintosh-rhapsody-cc.rul cdrtools-3.01a26~trusty/RULES/power-macintosh-rhapsody-cc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/power-macintosh-rhapsody-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/powerpc-beos-mwcc.rul cdrtools-3.01a26~trusty/RULES/powerpc-beos-mwcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/powerpc-beos-mwcc.rul 2007-05-08 11:07:58.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/profiled.lnk cdrtools-3.01a26~trusty/RULES/profiled.lnk --- cdrtools-3.00~trusty~mc3man1/RULES/profiled.lnk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/r-make.obj cdrtools-3.01a26~trusty/RULES/r-make.obj --- cdrtools-3.00~trusty~mc3man1/RULES/r-make.obj 2007-04-27 09:34:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/r-make.obj 2013-07-22 21:30:14.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)r-make.obj 1.7 07/04/27 +#ident @(#)r-make.obj 1.8 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. @@ -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) diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/r-smake.obj cdrtools-3.01a26~trusty/RULES/r-smake.obj --- cdrtools-3.00~trusty~mc3man1/RULES/r-smake.obj 2007-04-27 09:34:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/rules1.dir cdrtools-3.01a26~trusty/RULES/rules1.dir --- cdrtools-3.00~trusty~mc3man1/RULES/rules1.dir 2009-08-14 05:25:17.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/rules1.dir 2011-04-14 16:15:01.000000000 +0000 @@ -1,11 +1,11 @@ -#ident @(#)rules1.dir 1.15 09/08/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 diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/rules1.top cdrtools-3.01a26~trusty/RULES/rules1.top --- cdrtools-3.00~trusty~mc3man1/RULES/rules1.top 2010-05-14 14:03:37.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/rules1.top 2013-11-04 20:24:57.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules1.top 1.43 10/05/14 " +#ident "@(#)rules1.top 1.46 13/11/04 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -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) @@ -213,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) @@ -315,7 +323,7 @@ # - 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 @@ -338,7 +346,7 @@ $(INSTALLTARGETS) $(MANTARGETS) $(PKGTARGETS) INSTALLTARGETS= install -MANTARGETS= html htmlx +MANTARGETS= html htmlx htmlxn PKGTARGETS= tarpkg tarpkg1 tarpkg2 .PHONY: $(ALLTARGETS) .help tinfo shell diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/rules.clr cdrtools-3.01a26~trusty/RULES/rules.clr --- cdrtools-3.00~trusty~mc3man1/RULES/rules.clr 2006-05-14 11:55:28.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/rules.cmd cdrtools-3.01a26~trusty/RULES/rules.cmd --- cdrtools-3.00~trusty~mc3man1/RULES/rules.cmd 2010-05-13 18:44:38.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/rules.cmd 2013-07-22 21:31:33.000000000 +0000 @@ -1,6 +1,6 @@ -#ident @(#)rules.cmd 1.13 10/05/13 +#ident @(#)rules.cmd 1.14 13/07/22 ########################################################################### -# 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. @@ -41,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 diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/rules.cnf cdrtools-3.01a26~trusty/RULES/rules.cnf --- cdrtools-3.00~trusty~mc3man1/RULES/rules.cnf 2008-08-01 18:04:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/rules.cnf 2013-11-13 19:31:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident @(#)rules.cnf 1.13 08/08/01 +#ident @(#)rules.cnf 1.16 13/11/13 ########################################################################### -# Written 1998 by J. Schilling +# Written 1998-2013 by J. Schilling ########################################################################### # # Make Rules for global dynamic configuration @@ -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. @@ -44,9 +46,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)%=%) #CONFFLAGS += -cc=$(XCC_COM) @@ -57,10 +59,11 @@ $(RUL_CONF) ########################################################################### +OS_DEFS= $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) RUL_CONF= @echo " ==> CONFIGURING RULES \"$@\""; $(RM_F) $@; \ cd $(OINCSDIR); \ CONFIG_NOFAIL=TRUE CC="$(XCC_COM)" CFLAGS="$(CFLAGS)" \ - CXXFLAGS="$(C++FLAGS)" CPPFLAGS="$(OSDEFS)" \ + CXXFLAGS="$(C++FLAGS)" CPPFLAGS="$(OS_DEFS)" \ LDFLAGS="$(LDOPTS)" sh ../../autoconf/configure $(CONFFLAGS) ########################################################################### include $(OINCSDIR)/Inull diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/rules.csw cdrtools-3.01a26~trusty/RULES/rules.csw --- cdrtools-3.00~trusty~mc3man1/RULES/rules.csw 2009-05-14 18:58:05.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/rules.csw 2011-09-28 13:13:25.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.csw 1.4 09/05/14 " +#ident "@(#)rules.csw 1.6 11/09/28 " ########################################################################### # Written 2005 by J. Schilling ########################################################################### @@ -34,13 +34,19 @@ all: $(SRCROOT)/packages/$(OARCH) if [ .$(PKG_RELOC) = .no ]; then \ - pkgmk -o -r `pwd`/$(SRCROOT)/$(PROTODIR) -d $(SRCROOT)/packages/$(OARCH) -a $(P_ARCH) \ + pkgmk -o -r `pwd`/$(SRCROOT)/$(PROTODIR)$(PKGROOTX) -d $(SRCROOT)/packages/$(OARCH) \ + -a $(P_ARCH) \ -v $(VERSION),$(DATE) -f $(PROTOTYPE)_r \ - $(EMAIL:%=EMAIL=%) $(HOTLINE:%=HOTLINE=%); \ + $(EMAIL:%=EMAIL=%) $(HOTLINE:%=HOTLINE=%) \ + pkgbase=`pwd` \ + $(PKGOPTX); \ else \ - pkgmk -o -b `pwd`/$(SRCROOT)/$(PROTODIR)/$(INSBASE) -d $(SRCROOT)/packages/$(OARCH) -a $(P_ARCH) \ + 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=%); \ + $(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-3.00~trusty~mc3man1/RULES/rules.hlp cdrtools-3.01a26~trusty/RULES/rules.hlp --- cdrtools-3.00~trusty~mc3man1/RULES/rules.hlp 2009-07-10 19:50:37.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/rules.hlp 2011-09-18 11:55:27.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.hlp 1.15 09/07/10 " +#ident "@(#)rules.hlp 1.16 11/09/18 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -25,7 +25,7 @@ # - 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 @@ -50,6 +50,7 @@ @echo " ibins install the default target to local dir 'bins'" @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" diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/rules.htm cdrtools-3.01a26~trusty/RULES/rules.htm --- cdrtools-3.00~trusty~mc3man1/RULES/rules.htm 2007-05-06 13:09:42.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/rules.htm 2011-09-18 11:55:52.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.htm 1.3 07/05/06 " +#ident "@(#)rules.htm 1.4 11/09/18 " ########################################################################### # Written 2007 by J. Schilling ########################################################################### @@ -24,6 +24,15 @@ 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 '$$title.$$section.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-3.00~trusty~mc3man1/RULES/rules.inc cdrtools-3.01a26~trusty/RULES/rules.inc --- cdrtools-3.00~trusty~mc3man1/RULES/rules.inc 2009-07-26 12:27:36.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/rules.inc 2011-07-16 15:02:16.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)rules.inc 1.9 09/07/26 +#ident @(#)rules.inc 1.10 11/07/16 ########################################################################### # Written 1999 by J. Schilling ########################################################################### @@ -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-3.00~trusty~mc3man1/RULES/rules.loc cdrtools-3.01a26~trusty/RULES/rules.loc --- cdrtools-3.00~trusty~mc3man1/RULES/rules.loc 2007-05-06 12:50:26.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/rules.loc 2012-01-22 15:51:52.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.loc 1.7 07/05/06 " +#ident "@(#)rules.loc 1.8 12/01/22 " ########################################################################### # Written 1997 by J. Schilling ########################################################################### @@ -31,7 +31,7 @@ all: $(ARCHDIR) $(PTARGET) -$(PTARGET): $(SRCFILE) +$(PTARGET): $(ARCHDIR) $(SRCFILE) $(LOCALIZE) $(SRCFILE) $@ $(ARCHDIR): diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/rules.man cdrtools-3.01a26~trusty/RULES/rules.man --- cdrtools-3.00~trusty~mc3man1/RULES/rules.man 2010-05-14 14:03:37.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/rules.man 2012-01-23 21:41:41.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.man 1.5 10/05/14 " +#ident "@(#)rules.man 1.6 12/01/23 " ########################################################################### # Written 1997 by J. Schilling ########################################################################### @@ -46,7 +46,7 @@ all: $(ARCHDIR) $(PTARGET) -$(PTARGET): $(SRCFILE) +$(PTARGET): $(ARCHDIR) $(SRCFILE) $(LOCALIZE) $(SRCFILE) $@ $(ARCHDIR): diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/rules.rdi cdrtools-3.01a26~trusty/RULES/rules.rdi --- cdrtools-3.00~trusty~mc3man1/RULES/rules.rdi 2006-05-14 11:55:29.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/rules.rel cdrtools-3.01a26~trusty/RULES/rules.rel --- cdrtools-3.00~trusty~mc3man1/RULES/rules.rel 2007-06-10 12:22:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/rules.rel 2011-04-14 20:28:33.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)rules.rel 1.7 07/06/10 +#ident @(#)rules.rel 1.9 11/04/14 ########################################################################### # Written 2001 by J. Schilling ########################################################################### @@ -23,7 +23,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/ $(RELFILES_) + +release/: + $(MKDIR) -p $@ release/%.c: %.c rm -f $@ diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/rules.shl cdrtools-3.01a26~trusty/RULES/rules.shl --- cdrtools-3.00~trusty~mc3man1/RULES/rules.shl 2007-05-06 12:50:26.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/rules.sps cdrtools-3.01a26~trusty/RULES/rules.sps --- cdrtools-3.00~trusty~mc3man1/RULES/rules.sps 2007-05-06 12:50:26.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/rules.sps 2013-07-22 21:32:33.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)rules.sps 1.13 07/05/06 " +#ident "@(#)rules.sps 1.14 13/07/22 " ########################################################################### -# 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. @@ -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-3.00~trusty~mc3man1/RULES/rules.top cdrtools-3.01a26~trusty/RULES/rules.top --- cdrtools-3.00~trusty~mc3man1/RULES/rules.top 2009-11-24 21:01:49.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/rules.top 2014-03-31 15:24:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.top 1.20 09/07/26 " +#ident "@(#)rules.top 1.22 14/03/31 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -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. @@ -39,11 +41,22 @@ $(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= + +########################################################################### +# # Include global language independent macros # ########################################################################### diff -Nru cdrtools-3.00~trusty~mc3man1/RULES/sub.htm cdrtools-3.01a26~trusty/RULES/sub.htm --- cdrtools-3.00~trusty~mc3man1/RULES/sub.htm 2008-04-19 16:22:23.000000000 +0000 +++ cdrtools-3.01a26~trusty/RULES/sub.htm 2011-09-18 11:55:27.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)sub.htm 1.4 08/04/19 " +#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-3.00~trusty~mc3man1/RULES/sun4-sunos5-cc64.rul cdrtools-3.01a26~trusty/RULES/sun4-sunos5-cc64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/sun4-sunos5-cc64.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/sun4-sunos5-cc.rul cdrtools-3.01a26~trusty/RULES/sun4-sunos5-cc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/sun4-sunos5-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/sun4-sunos5-clang.rul cdrtools-3.01a26~trusty/RULES/sun4-sunos5-clang.rul --- cdrtools-3.00~trusty~mc3man1/RULES/sun4-sunos5-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/sun4-sunos5-gcc64.rul cdrtools-3.01a26~trusty/RULES/sun4-sunos5-gcc64.rul --- cdrtools-3.00~trusty~mc3man1/RULES/sun4-sunos5-gcc64.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/RULES/sun4-sunos5-gcc.rul cdrtools-3.01a26~trusty/RULES/sun4-sunos5-gcc.rul --- cdrtools-3.00~trusty~mc3man1/RULES/sun4-sunos5-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/scgcheck/dmaresid.c cdrtools-3.01a26~trusty/scgcheck/dmaresid.c --- cdrtools-3.00~trusty~mc3man1/scgcheck/dmaresid.c 2009-07-10 22:24:37.000000000 +0000 +++ cdrtools-3.01a26~trusty/scgcheck/dmaresid.c 2010-12-19 17:14:55.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)dmaresid.c 1.11 09/07/11 Copyright 1998-2009 J. Schilling */ +/* @(#)dmaresid.c 1.12 10/12/19 Copyright 1998-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)dmaresid.c 1.11 09/07/11 Copyright 1998-2009 J. Schilling"; + "@(#)dmaresid.c 1.12 10/12/19 Copyright 1998-2010 J. Schilling"; #endif /* - * Copyright (c) 1998-2009 J. Schilling + * Copyright (c) 1998-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -57,122 +58,122 @@ int ret; BOOL passed; - printf("Ready to start test for working DMA residual count? Enter to continue: "); + printf(_("Ready to start test for working DMA residual count? Enter to continue: ")); (void) chkgetline(abuf, sizeof (abuf)); - chkprint("**********> Testing for working DMA residual count.\n"); - chkprint("**********> 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) { - chkprint("----------> Wanted %d bytes, got it.\n", dmacnt); + chkprint(_("----------> Wanted %d bytes, got it.\n"), dmacnt); } if (ret != dmacnt) { - chkprint("----------> Wanted %d bytes, got (%d)\n", dmacnt, ret); + chkprint(_("----------> Wanted %d bytes, got (%d)\n"), dmacnt, ret); } if (ret != scg_getdmacnt(scgp)) { passed = FALSE; - chkprint("----------> 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) { - chkprint("----------> SCSI DMA residual count == 0 test PASSED\n"); + chkprint(_("----------> SCSI DMA residual count == 0 test PASSED\n")); } else { - chkprint("----------> 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: "); + 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"); + 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("Ready to start test for working DMA overrun detection? Enter to continue: "); + 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"); + 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")); } } @@ -200,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); @@ -214,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); @@ -245,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-3.00~trusty~mc3man1/scgcheck/Makefile cdrtools-3.01a26~trusty/scgcheck/Makefile --- cdrtools-3.00~trusty~mc3man1/scgcheck/Makefile 2009-01-14 18:38:54.000000000 +0000 +++ cdrtools-3.01a26~trusty/scgcheck/Makefile 2013-04-21 18:22:24.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile 1.12 09/01/14 +#ident @(#)Makefile 1.15 13/04/21 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -10,13 +10,18 @@ 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 HFILES= scgcheck.h version.h #LIBS= -lschily $(LIB_SOCKET) -LIBS= -lscgcmd -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: @@ -28,3 +33,4 @@ ########################################################################### count: $(CFILES) $(HFILES) count $r1 + diff -Nru cdrtools-3.00~trusty~mc3man1/scgcheck/MKLINKS cdrtools-3.01a26~trusty/scgcheck/MKLINKS --- cdrtools-3.00~trusty~mc3man1/scgcheck/MKLINKS 2008-10-26 21:49:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/scgcheck/MKLINKS 2011-08-04 21:45:27.000000000 +0000 @@ -1,10 +1,10 @@ #!/bin/sh ########################################################################### -#ident "@(#)MKLINKS 1.2 08/10/26 " +#ident "@(#)MKLINKS 1.4 11/08/04 " ########################################################################### -# Written 2008 by J. Schilling +# Written 2008-2011 by J. Schilling ########################################################################### -# Copyright (c) 2008 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 @@ -17,12 +17,18 @@ # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### symlink="ln -s" -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 -rm -f xxzzy.123 xxzzy.345 +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 . diff -Nru cdrtools-3.00~trusty~mc3man1/scgcheck/scgcheck.1 cdrtools-3.01a26~trusty/scgcheck/scgcheck.1 --- cdrtools-3.00~trusty~mc3man1/scgcheck/scgcheck.1 2010-05-28 21:19:48.000000000 +0000 +++ cdrtools-3.01a26~trusty/scgcheck/scgcheck.1 2014-12-03 21:20:04.000000000 +0000 @@ -1,4 +1,4 @@ -.\" @(#)scgcheck.1 1.17 10/05/28 Copyright 2000-2009 J. Schilling +.\" @(#)scgcheck.1 1.19 14/12/03 Copyright 2000-2009 J. Schilling .\" .\" The contents of this file are subject to the terms of the .\" Common Development and Distribution License, Version 1.0 only @@ -6,6 +6,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. @@ -273,7 +275,7 @@ .SH NOTES .PP When using -.B scgckeck +.B scgcheck with the broken .B "Linux SCSI generic driver." You should note that @@ -379,17 +381,17 @@ .PP Additional information can be found on: .br -http://cdrecord.berlios.de/private/cdrecord.html +http://cdrecord.org/private/cdrecord.html .PP If you have support questions, send them to: .PP .B -cdrecord-support@berlios.de +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 @@ -398,8 +400,8 @@ 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-3.00~trusty~mc3man1/scgcheck/scgcheck.c cdrtools-3.01a26~trusty/scgcheck/scgcheck.c --- cdrtools-3.00~trusty~mc3man1/scgcheck/scgcheck.c 2010-05-24 09:19:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/scgcheck/scgcheck.c 2011-08-03 21:28:27.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)scgcheck.c 1.19 10/05/24 Copyright 1998-2010 J. Schilling */ +/* @(#)scgcheck.c 1.21 11/08/03 Copyright 1998-2011 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)scgcheck.c 1.19 10/05/24 Copyright 1998-2010 J. Schilling"; + "@(#)scgcheck.c 1.21 11/08/03 Copyright 1998-2011 J. Schilling"; #endif /* - * Copyright (c) 1998-2010 J. Schilling + * Copyright (c) 1998-2011 J. Schilling * * Warning: This program has been written to verify the correctness * of the upper layer interface from the library "libscg". If you @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -81,18 +82,18 @@ 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("\t-auto try to do a fully automated test\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(_("\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); } @@ -114,9 +115,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; @@ -131,15 +153,16 @@ &help, &help, &pversion, &dev, &filename, &autotest) < 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("scgcheck %s (%s-%s-%s) Copyright (C) 1998-2010 Jörg Schilling\n", + printf(_("scgcheck %s (%s-%s-%s) Copyright (C) 1998-2011 %s\n"), scgc_version, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Joerg Schilling")); exit(0); } @@ -153,17 +176,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")); - chkprint("Scgcheck %s (%s-%s-%s) SCSI user level transport library ABI checker.\n\ -Copyright (C) 1998-2008 Jörg Schilling\n", + chkprint(_("Scgcheck %s (%s-%s-%s) SCSI user level transport library ABI checker.\n\ +Copyright (C) 1998-2011 %s\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 @@ -173,29 +197,29 @@ basefds = countopen(); if (xdebug) - error("nopen: %d\n", basefds); + error(_("nopen: %d\n"), basefds); - chkprint("**********> Checking whether your implementation supports to scan the SCSI bus.\n"); - chkprint("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"); - chkprint("Trying to open device: '%s'.\n", device); + chkprint(_("Trying to open device: '%s'.\n"), device); scgp = doopen(device); } while (scgp == NULL); if (scgp) { @@ -205,18 +229,18 @@ ret = select_target(scgp, stdout); select_target(scgp, logfile); if (ret < 1) { - chkprint("----------> SCSI scan bus test: found NO TARGETS\n"); + chkprint(_("----------> SCSI scan bus test: found NO TARGETS\n")); } else { - chkprint("----------> SCSI scan bus test PASSED\n"); + chkprint(_("----------> SCSI scan bus test PASSED\n")); } } else { - chkprint("----------> SCSI scan bus test FAILED\n"); + chkprint(_("----------> SCSI scan bus test FAILED\n")); } if (xdebug) - 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"); + 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; @@ -239,12 +263,12 @@ do { char Device[128]; - error("Enter SCSI device name [%s]: ", 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); + chkprint(_("Trying to open device: '%s'.\n"), device); scgp = doopen(device); if (scgp) { checkversion(scgp); @@ -255,7 +279,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. @@ -266,7 +290,7 @@ getdev(scgp, TRUE); printinq(scgp, logfile); - printf("Ready to start test for second SCSI open? Enter to continue: "); + 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 @@ -279,51 +303,51 @@ 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) { - chkprint("First SCSI open OK - device usable\n"); - chkprint("**********> 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) { /* * XXX Separates getbuf() fuer scgp2? */ - chkprint("Second SCSI open for same device succeeded, %d additional file descriptor(s) used.\n", + 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) { - chkprint("Second SCSI open is usable\n"); + chkprint(_("Second SCSI open is usable\n")); } - chkprint("Closing second SCSI.\n"); + chkprint(_("Closing second SCSI.\n")); scg_close(scgp2); scgp2 = NULL; - chkprint("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) { second_ok = TRUE; - chkprint("First SCSI open is still usable\n"); - chkprint("----------> Second SCSI open test PASSED.\n"); + 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; - chkprint("First SCSI open does not work anymore.\n"); - chkprint("----------> 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; - chkprint("First SCSI open has strange problems.\n"); - chkprint("----------> 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; - chkprint("Cannot open same SCSI device a second time.\n"); - chkprint("----------> 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; - chkprint("First SCSI open is not usable\n"); - chkprint("----------> Second SCSI open test FAILED.\n"); + chkprint(_("First SCSI open is not usable\n")); + chkprint(_("----------> Second SCSI open test FAILED.\n")); } if (xdebug > 1) error("scgp %p scgp2 %p\n", scgp, scgp2); @@ -334,7 +358,7 @@ 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"); + chkprint(_("First SCSI open is still usable\n")); } else { scg_freebuf(scgp); scg_close(scgp); @@ -347,26 +371,26 @@ } #endif /* CHECK_SECOND_OPEN */ - printf("Ready to start test for succeeded command? Enter to continue: "); + printf(_("Ready to start test for succeeded command? Enter to continue: ")); (void) chkgetline(abuf, sizeof (abuf)); - chkprint("**********> Checking for succeeded SCSI command.\n"); + 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, + scg_fprbytes(logfile, _("Inquiry Data :"), (Uchar *)buf, sizeof (struct scsi_inquiry) - scg_getresid(scgp)); if (ret >= 0 && !scg_cmd_err(scgp)) { - chkprint("----------> SCSI succeeded command test PASSED\n"); + chkprint(_("----------> SCSI succeeded command test PASSED\n")); } else { - chkprint("----------> SCSI succeeded command test FAILED\n"); + chkprint(_("----------> SCSI succeeded command test FAILED\n")); } sensetest(scgp); if (!autotest) - chkprint("----------> SCSI status byte test NOT YET READY\n"); + chkprint(_("----------> SCSI status byte test NOT YET READY\n")); /* * scan OK * work OK @@ -381,7 +405,7 @@ */ dmaresid(scgp); - chkprint("----------> SCSI transport code test NOT YET READY\n"); + chkprint(_("----------> SCSI transport code test NOT YET READY\n")); return (0); } @@ -393,10 +417,10 @@ char errstr[128]; 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", + 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); @@ -422,43 +446,43 @@ */ vers = scg_version(0, SCG_VERSION); auth = scg_version(0, SCG_AUTHOR); - chkprint("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 @@ -466,11 +490,11 @@ SCSI *scgp; { bufsize = scg_bufsize(scgp, MAX_BUF_SIZE); - chkprint("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); @@ -478,19 +502,19 @@ 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"); + 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); } @@ -504,7 +528,7 @@ int type = INQ_ROMD; 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, type, -1); if (ntarget < 0) return (ntarget); @@ -522,21 +546,21 @@ /* * 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")); #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", + 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", + 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)); @@ -561,10 +585,12 @@ 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); } /*--------------------------------------------------------------------------*/ diff -Nru cdrtools-3.00~trusty~mc3man1/scgcheck/sense.c cdrtools-3.01a26~trusty/scgcheck/sense.c --- cdrtools-3.00~trusty~mc3man1/scgcheck/sense.c 2010-05-24 09:19:15.000000000 +0000 +++ cdrtools-3.01a26~trusty/scgcheck/sense.c 2010-12-19 17:14:55.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)sense.c 1.10 10/05/24 Copyright 2001-2010 J. Schilling */ +/* @(#)sense.c 1.11 10/12/19 Copyright 2001-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)sense.c 1.10 10/05/24 Copyright 2001-2010 J. Schilling"; + "@(#)sense.c 1.11 10/12/19 Copyright 2001-2010 J. Schilling"; #endif /* * Copyright (c) 2001-2010 J. Schilling @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -60,9 +61,9 @@ BOOL passed = TRUE; BOOL needload = FALSE; - printf("Ready to start test for failing command? Enter to continue: "); + printf(_("Ready to start test for failing command? Enter to continue: ")); (void) chkgetline(abuf, sizeof (abuf)); - chkprint("**********> Testing for failed SCSI command.\n"); + 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'); @@ -71,12 +72,12 @@ scg_errfflush(scgp, logfile); if (ret >= 0 || !scg_cmd_err(scgp)) { inq_nofail = TRUE; - 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"); + 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: "); + printf(_("Ready to start test for failing command? Enter to continue: ")); (void) chkgetline(abuf, sizeof (abuf)); ret = test_unit_ready(scgp); scg_vsetup(scgp); @@ -112,9 +113,9 @@ if (ret >= 0 || !scg_cmd_err(scgp)) { - printf("Test Unit Ready did not fail.\n"); + printf(_("Test Unit Ready did not fail.\n")); - printf("Ready to eject tray? Enter to continue: "); + printf(_("Ready to eject tray? Enter to continue: ")); flushit(); (void) getline(abuf, sizeof (abuf)); if (abuf[0] != 'n') { @@ -136,63 +137,63 @@ scgp->scmd->error == SCG_NO_ERROR && scgp->scmd->ux_errno != 0 && *(Uchar *)&scgp->scmd->scb != 0) { - chkprint("----------> SCSI failed command test PASSED\n"); + chkprint(_("----------> SCSI failed command test PASSED\n")); } else { if (ret >= 0) { - chkprint("----------> scg_cmd() returns not -1 (%d)\n", ret); + chkprint(_("----------> scg_cmd() returns not -1 (%d)\n"), ret); } if (scgp->scmd->error != SCG_NO_ERROR) { - chkprint("----------> 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) { - chkprint("----------> UNIX errno set to 0\n"); + chkprint(_("----------> UNIX errno set to 0\n")); } if (*(Uchar *)&scgp->scmd->scb == 0) { - chkprint("----------> 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); } - chkprint("----------> 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: "); + 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); + 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) { - chkprint("----------> 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) { - chkprint("----------> Minimum standard (CCS) sense length failed\n"); - chkprint("----------> 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; - chkprint("----------> 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); } - chkprint("**********> 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) { - chkprint("----------> 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) { - chkprint("----------> 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; - chkprint("----------> 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); } - chkprint("----------> 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) { - chkprint("----------> SCSI sense count test PASSED\n"); + chkprint(_("----------> SCSI sense count test PASSED\n")); } else { - chkprint("----------> SCSI sense count test FAILED\n"); + chkprint(_("----------> SCSI sense count test FAILED\n")); } } @@ -217,8 +218,8 @@ 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); + 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--) { if (p[i] != 0x00) { @@ -227,7 +228,7 @@ } i++; maxcnt = i; -chkprint("----------> 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'); @@ -236,8 +237,8 @@ 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); + 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--) { if (p[i] != 0xFF) { @@ -247,7 +248,7 @@ i++; if (i > maxcnt) maxcnt = i; -chkprint("----------> 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--; @@ -285,7 +286,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); } diff -Nru cdrtools-3.00~trusty~mc3man1/scgskeleton/Makefile cdrtools-3.01a26~trusty/scgskeleton/Makefile --- cdrtools-3.00~trusty~mc3man1/scgskeleton/Makefile 2010-05-13 17:03:09.000000000 +0000 +++ cdrtools-3.01a26~trusty/scgskeleton/Makefile 2013-04-21 18:22:09.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile 1.16 10/05/13 +#ident @(#)Makefile 1.18 13/04/21 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -14,6 +14,8 @@ 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 \ @@ -21,8 +23,10 @@ misc.c #HFILES= cdrecord.h iodefs.h scsi_scan.h scsimmc.h - -LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -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 cd_misc.c scsi_cdr.c scsi_scan.c io.c misc.c: diff -Nru cdrtools-3.00~trusty~mc3man1/scgskeleton/MKLINKS cdrtools-3.01a26~trusty/scgskeleton/MKLINKS --- cdrtools-3.00~trusty~mc3man1/scgskeleton/MKLINKS 2009-08-15 14:35:58.000000000 +0000 +++ cdrtools-3.01a26~trusty/scgskeleton/MKLINKS 2011-08-04 21:45:27.000000000 +0000 @@ -1,10 +1,10 @@ #!/bin/sh ########################################################################### -#ident "@(#)MKLINKS 1.5 09/08/15 " +#ident "@(#)MKLINKS 1.7 11/08/04 " ########################################################################### -# Written 2008 by J. Schilling +# Written 2008-2011 by J. Schilling ########################################################################### -# Copyright (c) 2008 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 @@ -17,12 +17,18 @@ # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### symlink="ln -s" -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 -rm -f xxzzy.123 xxzzy.345 +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 . diff -Nru cdrtools-3.00~trusty~mc3man1/scgskeleton/scgskeleton.1 cdrtools-3.01a26~trusty/scgskeleton/scgskeleton.1 --- cdrtools-3.00~trusty~mc3man1/scgskeleton/scgskeleton.1 2010-05-28 21:18:10.000000000 +0000 +++ cdrtools-3.01a26~trusty/scgskeleton/scgskeleton.1 2014-12-03 21:19:20.000000000 +0000 @@ -1,4 +1,4 @@ -.\" @(#)scgskeleton.1 1.2 10/05/28 Copyright 1986-2010 J. Schilling +.\" @(#)scgskeleton.1 1.3 14/12/03 Copyright 1986-2010 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 @@ -410,17 +410,17 @@ .PP Additional information can be found on: .br -http://cdrecord.berlios.de/private/cdrecord.html +http://cdrecord.org/private/cdrecord.html .PP If you have support questions, send them to: .PP .B -cdrecord-support@berlios.de +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 @@ -429,8 +429,8 @@ 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-3.00~trusty~mc3man1/scgskeleton/skel.c cdrtools-3.01a26~trusty/scgskeleton/skel.c --- cdrtools-3.00~trusty~mc3man1/scgskeleton/skel.c 2010-05-17 21:34:14.000000000 +0000 +++ cdrtools-3.01a26~trusty/scgskeleton/skel.c 2010-12-19 14:48:41.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)skel.c 1.21 10/05/17 Copyright 1987, 1995-2010 J. Schilling */ +/* @(#)skel.c 1.22 10/12/19 Copyright 1987, 1995-2010 J. Schilling */ #include #ifndef lint static UConst char sccsid[] = - "@(#)skel.c 1.21 10/05/17 Copyright 1987, 1995-2010 J. Schilling"; + "@(#)skel.c 1.22 10/12/19 Copyright 1987, 1995-2010 J. Schilling"; #endif /* * Skeleton for the use of the scg genearal SCSI - driver @@ -33,6 +33,7 @@ #include #include #include +#include #include #include /* for setmode() prototype */ @@ -101,20 +102,20 @@ 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(_("\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); } @@ -130,6 +131,9 @@ int fcount; int cac; char * const *cav; +#if defined(USE_NLS) + char *dir; +#endif int scsibus = -1; int target = -1; int lun = -1; @@ -146,6 +150,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 "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; @@ -163,15 +185,16 @@ &dev, 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-2010 Jörg Schilling\n", + printf(_("scgskeleton %s (%s-%s-%s) Copyright (C) 1987, 1995-2010 %s\n"), skel_version, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Joerg Schilling")); exit(0); } @@ -184,7 +207,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 */ @@ -193,7 +216,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 */ @@ -202,7 +225,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 */ @@ -215,11 +238,11 @@ 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) { @@ -240,9 +263,9 @@ if ((scgp = scg_open(dev, errstr, sizeof (errstr), debug, lverbose)) == (SCSI *)0) { 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 { @@ -255,7 +278,7 @@ scg_settarget(scgp, scsibus, target, lun); if (scg__open(scgp, NULL) <= 0) - comerr("Cannot open SCSI driver.\n"); + comerr(_("Cannot open SCSI driver.\n")); } scgp->silent = silent; scgp->verbose = verbose; @@ -267,7 +290,7 @@ 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 /* @@ -300,7 +323,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 */ @@ -369,7 +392,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); } @@ -416,7 +439,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; @@ -429,7 +452,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)); } #endif @@ -446,7 +469,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; @@ -472,12 +495,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; @@ -485,7 +508,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-3.00~trusty~mc3man1/TEMPLATES/Defaults.clang cdrtools-3.01a26~trusty/TEMPLATES/Defaults.clang --- cdrtools-3.00~trusty~mc3man1/TEMPLATES/Defaults.clang 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/TEMPLATES/Defaults.clang 2014-03-24 16:22:59.000000000 +0000 @@ -0,0 +1,38 @@ +#ident "@(#)Defaults.clang 1.1 14/03/24 " +########################################################################### +# +# global definitions for unknown Systems using CC=clang +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +#DEFCCOM= cc +DEFCCOM= clang +########################################################################### +# +# 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 +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= / +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= bin +DEFINSGRP= bin diff -Nru cdrtools-3.00~trusty~mc3man1/TEMPLATES/Makefile.shl cdrtools-3.01a26~trusty/TEMPLATES/Makefile.shl --- cdrtools-3.00~trusty~mc3man1/TEMPLATES/Makefile.shl 1997-03-04 15:29:30.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/TEMPLATES/MKLINKS cdrtools-3.01a26~trusty/TEMPLATES/MKLINKS --- cdrtools-3.00~trusty~mc3man1/TEMPLATES/MKLINKS 2009-08-16 12:16:08.000000000 +0000 +++ cdrtools-3.01a26~trusty/TEMPLATES/MKLINKS 2014-03-31 13:13:40.000000000 +0000 @@ -1,10 +1,10 @@ #!/bin/sh ########################################################################### -#ident "@(#)MKLINKS 1.1 09/08/16 " +#ident "@(#)MKLINKS 1.4 14/03/31 " ########################################################################### -# Written 2008 by J. Schilling +# Written 2008-2011 by J. Schilling ########################################################################### -# Copyright (c) 2008 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 @@ -12,20 +12,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. ########################################################################### symlink="ln -s" -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 -rm -f xxzzy.123 xxzzy.345 +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 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-3.00~trusty~mc3man1/TEMPLATES/temp-clang.rul cdrtools-3.01a26~trusty/TEMPLATES/temp-clang.rul --- cdrtools-3.00~trusty~mc3man1/TEMPLATES/temp-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.01a26~trusty/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-3.00~trusty~mc3man1/TEMPLATES/temp-gcc.rul cdrtools-3.01a26~trusty/TEMPLATES/temp-gcc.rul --- cdrtools-3.00~trusty~mc3man1/TEMPLATES/temp-gcc.rul 2009-07-25 23:29:35.000000000 +0000 +++ cdrtools-3.01a26~trusty/TEMPLATES/temp-gcc.rul 2014-03-31 13:13:40.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)temp-gcc.rul 1.3 09/07/26 " +#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)/cc-gcc.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul OSDEFS=