From: DongHun Kwak Date: Thu, 28 Jun 2018 05:22:45 +0000 (+0900) Subject: Imported Upstream version 610c14 X-Git-Tag: upstream/610c14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F91%2F182791%2F1;p=platform%2Fupstream%2Funzip.git Imported Upstream version 610c14 Change-Id: I6cac006379bfb422778c5081fd3f0643ad68ec2f Signed-off-by: DongHun Kwak --- diff --git a/History.610 b/History.610 index 422e494..13b18f8 100644 --- a/History.610 +++ b/History.610 @@ -1560,3 +1560,17 @@ Bugs fixed: - Code tidying. Moved a VMS-specific variable (terminal echo state) from local static storage into the (dynamic) global data structure. (globals.c, globals.h, ttyio.c) [SMS] + +6.10c14 (03 Jan 2015): + - Removed the erroneous "fix" made to unix/Makefile in 6.10c13. Fixed + an actual error in a comment. Added '"$(PROD)"/*.dSYM' to the list + of files removed by the "clean" target (for Mac OS X). + (unix/Makefile) [SMS] + - Minor code changes to clear some compiler complaints. (extract.c) + [SMS] + - Limited to VMS a change intended to fix a message format problem on + VMS. It was enabled everywhere, but could cause spurious blank lines + on non-VMS systems. (fileio.c) [SMS] + _ Added more details to documentation on build customization. + (INSTALL) [SMS] + - Advanced copyright dates in messages to 2015. (unzip.c) [SMS] diff --git a/INSTALL b/INSTALL index e9ba2c0..dfd17af 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ INSTALL -- Info-ZIP UnZip Installation Instructions =================================================== - UnZip version 6.10. Revised: 2014-11-08 + UnZip version 6.10. Revised: 2015-01-03 ------------------------------------------------------------------------ @@ -378,6 +378,96 @@ directory. For example: where "../iz_bzip2" is a real bzip2 directory or a link to one. +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + Basic Build Customization + ------------------------- + + One way to customize a "generic" build is to specify compiler and +linker options other than the defaults. This can be done by specifying +values for some "make" macros in the "make" command line, such as the +following: + + CFLAGS_OPT C compiler options related to optimization. + LOCAL_UNZIP Ordinary C compiler options. + LFLAGS1 Linker options (early in the command). + LFLAGS2 Linker options (late in the command). + + For example, to build executables for debugging, we might wish to use +compiler options like "-g -O0" instead of whatever the "unix/configure" +script might select, we might wish to link the executables without the +default "-s" (strip) option, and we might wish to disable the usual +signal handlers, so that we will get a "core" dump file in the case of a +segmentation fault or similar run-time disaster. + + We can specify a value for CFLAGS_OPT to override the usual compiler +optimization options, for LFLAGS2 to override the usual "-s" option, and +for LOCAL_UNZIP to define the C macro NO_EXCEPT_SIGNALS to disable the +signal handler. (See unix/configure and unix/Makefile for more details +on these "make" macros. Look for NO_EXCEPT_SIGNALS in unzip.c, and see +"C Macros to Control UnZip Behavior", below.) The resulting command +might look like the following: + + make -f unix/Makefile CC=cc PROD=cc_dbg CFLAGS_OPT='-g -O0' \ + LOCAL_UNZIP=-DNO_EXCEPT_SIGNALS LFLAGS2=-L. generic + + We specify "PROD=cc_dbg" to keep these debug objects and executables +separate from the usual ones. It's difficult to specify a null option +for LFLAGS2 (to override the default "-s"), but we can specify a +non-null option which has no real effect. Here, "-L." overrides the +default "-s", but does nothing else. + + Note that when using "make generic", the "unix/configure" script +stores various build options ("make" macro definitions) in a (text) +file, "flags", in the main destination directory, "$(PROD)" (default: +"."). When building with different options in a particular destination +directory, the user must first delete the old "$(PROD)/flags" file. +Normally, the whole destination directory should be cleaned out, and the +"make" target "clean" will do that. For example, before doing: + + make -f unix/Makefile CC=cc PROD=cc_dbg CFLAGS_OPT='-g -O0' \ + LOCAL_UNZIP=-DNO_EXCEPT_SIGNALS LFLAGS2=-L. generic + +do: + + make -f unix/Makefile CC=cc PROD=cc_dbg CFLAGS_OPT='-g -O0' \ + LOCAL_UNZIP=-DNO_EXCEPT_SIGNALS LFLAGS2=-L. clean + +or (because the "clean" target needs less information than an actual +build): + + make -f unix/Makefile PROD=cc_dbg clean + +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + Other Build Customization + ------------------------- + + In some more complex situations, the "unix/configure" script may not +set all the build options as desired. One way to work around problems +with "make generic" is to use a two-step procedure. First, instead of +doing "make generic", do "make config_flags". For example: + + make -f unix/Makefile [other-options ...] clean + make -f unix/Makefile [other-options ...] config_flags + + This should run the "unix/configure" script, which generates the +build options file, "$(PROD)/flags" (described in the previous section), +and then stop. This "flags" file contains the "make" macros which will +be used in the second step. This file can be edited to make final +adjustments to compile options, link options, and so on. + + When the new "flags" has been changed as desired, the second step is +to complete the build using the "generic" target. For example: + + make -f unix/Makefile [other-options ...] generic + +This should do the build using the changed data in the edited "flags" +file. + + Of course, it's also possible to edit "unix/configure" and/or +"unix/Makefile", but normally that's not required. + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - UnZipSFX Considerations @@ -410,34 +500,6 @@ following: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Helping "make generic" - ---------------------- - - In some situations, the "unix/configure" script may not set all the -build options as desired. One way to work around problems with "make -generic" is to use a two-step procedure. First, instead of doing "make -generic", do "make config_flags". For example: - - make -f unix/Makefile [other-options ...] config_flags - -This should run the "unix/configure" script, which generates a "flags" -(text) file in the main destination directory ("$(PROD)", default: "."). -The file "flags" contains all the "make" macros which will be used in -the second step. This file can be edited to make final adjustments to -compile options, link options, and so on. - - When "flags" has been changed as desired, the second step is to build -using the "generic" target. For example: - - make -f unix/Makefile [other-options ...] generic - -This should do the build using the changed "flags" file. - - Of course, it's also possible to edit "unix/configure" and/or -"unix/Makefile", but normally that's not required. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Non-"generic" Builds -------------------- @@ -489,9 +551,9 @@ as instructed. The comments in unix/Makefile may offer some useful information for building on various target systems. Use of "make" targets other than "generic" requires some care, -because other targets typically do not use the unix/configure script (or -its intermediate "flags" file), and this may cause programs to be built -without some expected features enabled. +because other targets typically do not use the "unix/configure" script +(or its intermediate "flags" file), and this may cause programs to be +built without some expected features enabled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -500,8 +562,8 @@ without some expected features enabled. Macintosh (Mac OS X) On Mac OS X, use the Unix build procedure, described above. When -using Xcode, the optional command-line tools must be installed. For -pre-Mac-OS-X Macintosh, see below for old infomation. + using Xcode, the optional command-line tools must be installed. For + pre-Mac-OS-X Macintosh, see below for old infomation. MS-DOS See the msdos\Contents file for notes regarding which makefile(s) to @@ -845,7 +907,7 @@ Human68K, TOPS-20, AOS/VS, etc. Post-Installation ----------------- - Many operating systems require a timezone variable to be set + Some operating systems may require a timezone variable to be set correctly (often "TZ"). Unix and VMS generally do so by default. Windows does, if set up properly. Other operating systems may not. See the discussion of the -f and -u options in the UnZip man page (or @@ -1033,6 +1095,15 @@ NO_DEFLATE_SFX executable. (Currently, Deflate support is always enabled in UnZip itself.) +NO_EXCEPT_SIGNALS + Disable the normal signal handler. By default, UnZip has a signal + handler which emits an error message in the event of a program fault + like a bus error, segmentation fault, ACCVIO, and so on. On a Unix + system, this avoids creating a "core" dump file in these cases. When + debugging, it can be more useful to disable the default signal + handler, and let the debugger handle these faults instead (or just + create a "core" file for later analysis). + NO_SFX_EXDIR Disable the "-d " option in UnZipSFX. Since UnZip 5.5, "-d" has been enabled by default, to facilitate use with automated diff --git a/README b/README index 976bf1c..4d6a9c6 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ ------------------------ Program version: 6.10c (BETA) - Document date: 2014-02-29 + Document date: 2015-01-02 ------------------------------------------------------------------------ @@ -160,19 +160,19 @@ TOPS-20. A DLL is available for OS/2 and Windows. - "-v" report includes some raw hexadecimal values along with the old descriptions/interpretations. -- New -da/--auto-auto-extract-dir option to specify a destination - directory for extracted files which is derived from the base name of - the archive. For example, with -da, extraction of "fred.zip" is done - into subdirectory "fred" instead of into the current directory. (On - VMS, subdirectory "[.fred]".) +- New -da/--auto-extract-dir option to specify a destination directory + for extracted files which is derived from the base name of the + archive. For example, with -da, extraction of "fred.zip" is done into + subdirectory "fred" instead of into the current directory. (On VMS, + subdirectory "[.fred]".) - -j/--junk-dirs option now accepts an optional value, the number of directory levels to discard. As before, plain "-j" discards all directory names. "-j=N" discards only the top "N" directory levels. -- Initial support for AppleDouble storage of Finder info and resource - fork data on Macintosh (Mac OS X) systems. Intended to be compatible - with Apple "ditto". +- Initial support for AppleDouble storage of Finder info, resource fork + data, and extended attributes on Macintosh (Mac OS X) systems. + Intended to be compatible with Apple "ditto". - Initial support for an UnZip object library on Unix and VMS, providing a callable UnZip interface. Comments in an example main program @@ -188,9 +188,7 @@ TOPS-20. A DLL is available for OS/2 and Windows. - More consistent with Zip. - Use "CC=gcc" to specify GCC. "make" targets "*_gcc" are gone. - Use "PROD=subdir" to put product files (objects, executables, ...) - into a subdirectory, rather than ".". In case of PROD-related - build problems, older, pre-PROD builders are available as - unix/configure_old and unix/Makefile_old. + into a subdirectory, rather than ".". - Windows MinGW support. - Minor changes to accommodate BAE Systems STOP OS. - Output from unix/configure script (used by "make generic") is more diff --git a/extract.c b/extract.c index b32607a..c7fd2e8 100644 --- a/extract.c +++ b/extract.c @@ -124,7 +124,7 @@ static int extract_or_test_member OF((__GPRO)); #ifndef SFX static int TestExtraField OF((__GPRO__ uch *ef, long ef_len)); static int test_compr_eb OF((__GPRO__ uch *eb, long eb_size, - unsigned compr_offset, + long compr_offset, int (*test_uc_ebdata)(__GPRO__ uch *eb, long eb_size, uch *eb_ucptr, ulg eb_ucsize))); #endif @@ -371,7 +371,7 @@ ZCONST char Far TruncNTSD[] = static ZCONST char Far InconsistEFlength[] = "bad extra-field entry:\n\ EF block length (%ld bytes) exceeds remaining EF data (%ld bytes)\n"; static ZCONST char Far TooSmallEFlength[] = "bad extra-field entry:\n\ - EF block length (%u bytes) invalid (< %d)\n"; + EF block length (%lu bytes) invalid (< %d)\n"; static ZCONST char Far InvalidComprDataEAs[] = " invalid compressed data for EAs\n"; # if defined(WIN32) && defined(NTSD_EAS) @@ -3636,6 +3636,8 @@ static int extract_or_test_member(__G) /* return PK-type error code */ * catch underflow of ef_len caused by corrupt/malicious * data. (32-bit is adequate. Used "long" to * accommodate any systems with 16-bit "int".) + * 2015-01-01 SMS. + * And eb_cmpr_offs. See also test_compr_eb():compr_offset. */ static int TestExtraField(__G__ ef, ef_len) @@ -3645,7 +3647,7 @@ static int TestExtraField(__G__ ef, ef_len) { ush eb_id; long eb_len; - unsigned eb_cmpr_offs = 0; + long eb_cmpr_offs = 0; int r; /* we know the regular compressed file data tested out OK, or else we @@ -3862,7 +3864,7 @@ static int test_compr_eb( __GPRO__ uch *eb, long eb_size, - unsigned compr_offset, + long compr_offset, int (*test_uc_ebdata)(__GPRO__ uch *eb, long eb_size, uch *eb_ucptr, ulg eb_ucsize)) #else /* !PROTO */ @@ -3870,7 +3872,7 @@ static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata) __GDEF uch *eb; long eb_size; - unsigned compr_offset; + long compr_offset; int (*test_uc_ebdata)(); #endif /* ?PROTO */ { diff --git a/fileio.c b/fileio.c old mode 100755 new mode 100644 index 02c6d6f..4f64899 --- a/fileio.c +++ b/fileio.c @@ -1743,7 +1743,6 @@ int UZ_EXP UzpMessagePrnt(pG, buf, size, flag) #ifdef VMS /* Save the output file for the prompt function. */ ((Uz_Globs *)pG)->msgfp = outfp; -#endif /* def VMS */ /* 2011-05-07 SMS. * VMS needs to handle toggling between stdout and stderr in its own @@ -1758,6 +1757,14 @@ int UZ_EXP UzpMessagePrnt(pG, buf, size, flag) * This closes the old stdout line properly, allowing the new error * message to appear on its own line, with no spurious blank lines * added. This method seems to work on UNIX, too. + * + * 2014-12-31 SMS. + * Actually, on UNIX, it can add an extra (excessive) blank line, so + * back to VMS-only. For example, after: + * replace xxx.xxx? [y]es, [n]o, [A]ll, [N]one, [r]ename: r + * new name: yyy.yyy + * + * inflating: yyy.yyy */ /* When outfp changes, "\n"-terminate any pending line. */ @@ -1770,6 +1777,7 @@ int UZ_EXP UzpMessagePrnt(pG, buf, size, flag) } ((Uz_Globs *)pG)->outfp_prev = outfp; } +#endif /* def VMS */ #ifdef QUERY_TRNEWLN /* some systems require termination of query prompts with '\n' to force diff --git a/unix/Makefile b/unix/Makefile old mode 100755 new mode 100644 index 4fa83a1..c526080 --- a/unix/Makefile +++ b/unix/Makefile @@ -1,6 +1,6 @@ #============================================================================== # unix/Makefile -# - For UnZip, fUnZip, UnZipSFX, and ZipInfo Revised: 2014-11-14 +# - For UnZip, fUnZip, UnZipSFX, and ZipInfo Revised: 2015-01-03 # # Copyright (c) 2004-2014 Info-ZIP. All rights reserved. # @@ -23,7 +23,7 @@ # "make -f unix/Makefile help" Limited advice on which targets to # try if problems occur. # -# CF are flags for the C compiler. LF are flags for the linker. LF2 +# CF are flags for the C compiler. LF1 are flags for the linker. LF2 # are more flags for the linker, if they need to be at the end of the # line instead of at the beginning (for example, some libraries). # LOCAL_UNZIP is a "make" macro that can be used to add default C flags @@ -1189,8 +1189,8 @@ $(PROD)/flags: unix/configure "LIST='$(LIST)'" \ "CC='$(CC)'" \ "CFLAGS='$(LOCAL_UNZIP)'" \ - "LF1='$(LF1)'" \ - "LF2='$(LF2)'" \ + "LFLAGS1='$(LFLAGS1)'" \ + "LFLAGS2='$(LFLAGS2)'" \ "NO_AES_WG='$(NO_AES_WG)'" \ "IZ_BZIP2='$(IZ_BZIP2)'" \ "NO_IZ_BZIP2='$(NO_IZ_BZIP2)'" \ @@ -1235,8 +1235,8 @@ clean: rm -f "$(PROD)"/*.o "$(PROD)"/*.a $(UNZIP_PPGMS); \ echo "rm -f \"$(PROD)\"/flags \"$(PROD)\"/flags_bz"; \ rm -f "$(PROD)"/flags "$(PROD)"/flags_bz; \ - echo "rm -f $(PROD)/manout"; \ - rm -rf "$(PROD)"/manout; \ + echo "rm -f \"$(PROD)\"/*.dSYM \"$(PROD)\"/manout"; \ + rm -rf "$(PROD)"/*.dSYM "$(PROD)"/manout; \ fi # # Remove empty $(PROD) directory. if [ -d "$(PROD)" ]; then \ diff --git a/unzip.c b/unzip.c index a91fe34..9df84cc 100644 --- a/unzip.c +++ b/unzip.c @@ -1,5 +1,5 @@ /* - Copyright (c) 1990-2014 Info-ZIP. All rights reserved. + Copyright (c) 1990-2015 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2009-Jan-02 or later (the contents of which are also included in unzip.h) for terms of use. @@ -710,22 +710,22 @@ static ZCONST char Far EnvGO32TMP[] = "GO32TMP"; /* Used in vms/cmdline.c, so not static in VMS CLI. "/lic" v. "--lic". */ ZCONST char Far UnzipUsageLine1[] = "\ UnZip %d.%d%d%s of %s, by Info-ZIP. Maintainer: \n\ - Copyright (c) 1990-2014 Info-ZIP. For software license: unzip /license\n"; + Copyright (c) 1990-2015 Info-ZIP. For software license: unzip /license\n"; # else /* def VMSCLI */ static ZCONST char Far UnzipUsageLine1[] = "\ UnZip %d.%d%d%s of %s, by Info-ZIP. Maintainer: \n\ - Copyright (c) 1990-2014 Info-ZIP. For software license: unzip --license\n"; + Copyright (c) 1990-2015 Info-ZIP. For software license: unzip --license\n"; # endif /* def VMSCLI [else] */ # else /* def COPYRIGHT_CLEAN */ /* Smith copyright, not maintainer. */ # ifdef VMSCLI /* Used in vms/cmdline.c, so not static in VMS CLI. "/lic" v. "--lic". */ ZCONST char Far UnzipUsageLine1[] = "\ UnZip %d.%d%d%s of %s, by Info-ZIP. UnReduce (c) 1989 by S. H. Smith.\n\ - Copyright (c) 1990-2014 Info-ZIP. For software license: unzip /license\n"; + Copyright (c) 1990-2015 Info-ZIP. For software license: unzip /license\n"; # else /* def VMSCLI */ static ZCONST char Far UnzipUsageLine1[] = "\ UnZip %d.%d%d%s of %s, by Info-ZIP. UnReduce (c) 1989 by S. H. Smith.\n\ - Copyright (c) 1990-2014 Info-ZIP. For software license: unzip --license\n"; + Copyright (c) 1990-2015 Info-ZIP. For software license: unzip --license\n"; # endif /* def VMSCLI [else] */ # endif /* def COPYRIGHT_CLEAN [else] */ # define UnzipUsageLine1v UnzipUsageLine1 @@ -3401,7 +3401,7 @@ static void show_license(__G) /* license array */ static ZCONST char *text[] = { - "Copyright (c) 1990-2014 Info-ZIP. All rights reserved.", + "Copyright (c) 1990-2015 Info-ZIP. All rights reserved.", "", "This is version 2009-Jan-02 of the Info-ZIP license.", "", diff --git a/unzvers.h b/unzvers.h index dfaad19..027c930 100644 --- a/unzvers.h +++ b/unzvers.h @@ -1,5 +1,5 @@ /* - Copyright (c) 1990-2014 Info-ZIP. All rights reserved. + Copyright (c) 1990-2015 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2009-Jan-02 or later (the contents of which are also included in unzip.h) for terms of use. @@ -24,11 +24,11 @@ # endif # ifdef BETA -# define UZ_BETALEVEL "c13 BETA" -# define UZ_VERSION_DATE "26 Dec 2014" /* Internal beta version. */ +# define UZ_BETALEVEL "c14 BETA" +# define UZ_VERSION_DATE "05 Jan 2015" /* Internal beta version. */ # else # define UZ_BETALEVEL "" -# define UZ_VERSION_DATE "?? ??? 2014" /* Official release version. */ +# define UZ_VERSION_DATE "?? ??? 2015" /* Official release version. */ # define RELEASE # endif diff --git a/vms/descrip_src.mms b/vms/descrip_src.mms old mode 100755 new mode 100644 diff --git a/zip-comment.txt b/zip-comment.txt index 1b8e22e..6997496 100644 --- a/zip-comment.txt +++ b/zip-comment.txt @@ -1,5 +1,5 @@ -Info-Zip UnZip -- Source kit. Version 6.10c13 (BETA) 26 Dec 2014. +Info-Zip UnZip -- Source kit. Version 6.10c14 (BETA) 05 Jan 2015. See enclosed files INSTALL, LICENSE, and README. For information on Info-Zip UnZip and Zip: