From 6f2fc23f77877bfe45620b1f5600a1b16b320e1e Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Thu, 22 Jun 2006 14:11:58 +0200 Subject: [PATCH] Added LZMA license information. --- src/compress_lzma.cpp | 42 ++++++++++++++++++++++++++++++++++++++++-- src/conf.h | 12 ++++++------ src/help.cpp | 10 ++++++---- 3 files changed, 52 insertions(+), 12 deletions(-) diff --git a/src/compress_lzma.cpp b/src/compress_lzma.cpp index cebffe92..c14af5ac 100644 --- a/src/compress_lzma.cpp +++ b/src/compress_lzma.cpp @@ -34,6 +34,44 @@ int compress_lzma_dummy = 0; #else +// INFO: the LZMA SDK is covered by by a permissive license which allows +// using unmodified LZMA source code in UPX and the UPX stubs. +// See SPECIAL EXCEPTION below. +// +// Quoting from lzma-4.43/lzma.txt: +// +// LICENSE +// ------- +// +// LZMA SDK is available under any of the following licenses: +// +// 1) GNU Lesser General Public License (GNU LGPL) +// 2) Common Public License (CPL) +// 3) Simplified license for unmodified code (read SPECIAL EXCEPTION) +// 4) Proprietary license +// +// It means that you can select one of these four options and follow rules +// of that license. +// +// 1,2) GNU LGPL and CPL licenses are pretty similar and both these +// licenses are classified as +// - "Free software licenses" at http://www.gnu.org/ +// - "OSI-approved" at http://www.opensource.org/ +// +// 3) SPECIAL EXCEPTION +// +// Igor Pavlov, as the author of this code, expressly permits you +// to statically or dynamically link your code (or bind by name) +// to the files from LZMA SDK without subjecting your linked +// code to the terms of the CPL or GNU LGPL. +// Any modifications or additions to files from LZMA SDK, however, +// are subject to the GNU LGPL or CPL terms. +// +// SPECIAL EXCEPTION allows you to use LZMA SDK in applications with closed code, +// while you keep LZMA SDK code unmodified. + + + /************************************************************************* // cruft because of pseudo-COM layer **************************************************************************/ @@ -252,7 +290,7 @@ error: /************************************************************************* -// LZMA decompress +// decompress **************************************************************************/ #undef _LZMA_IN_CB @@ -308,7 +346,7 @@ error: /************************************************************************* -// +// test_overlap **************************************************************************/ int upx_lzma_test_overlap ( const upx_bytep buf, upx_uint src_off, diff --git a/src/conf.h b/src/conf.h index 83a04eec..ee855a6b 100644 --- a/src/conf.h +++ b/src/conf.h @@ -211,9 +211,9 @@ struct upx_callback_t struct lzma_compress_config_t { #if 0 - unsigned pos_bits; - unsigned lit_pos_bits; - unsigned lit_context_bits; + unsigned pos_bits; // pb + unsigned lit_pos_bits; // lp + unsigned lit_context_bits; // lc unsigned dict_size; unsigned mf_passes; #else @@ -231,9 +231,9 @@ struct upx_compress_config_t struct lzma_compress_result_t { - unsigned pos_bits; - unsigned lit_pos_bits; - unsigned lit_context_bits; + unsigned pos_bits; // pb + unsigned lit_pos_bits; // lp + unsigned lit_context_bits; // lc unsigned dict_size; unsigned num_probs; }; diff --git a/src/help.cpp b/src/help.cpp index c89925b0..ecc549c2 100644 --- a/src/help.cpp +++ b/src/help.cpp @@ -342,21 +342,23 @@ void show_version(int x) FILE *f = stdout; UNUSED(x); -#if (0 && ACC_CC_GNUC) - fprintf(f,"upx %s (gcc 0x%06lx)\n", UPX_VERSION_STRING, ACC_CC_GNUC); -#else fprintf(f,"upx %s\n", UPX_VERSION_STRING); -#endif #if defined(WITH_NRV) fprintf(f,"NRV data compression library %s\n", nrv_version_string()); #endif #if defined(WITH_UCL) fprintf(f,"UCL data compression library %s\n", ucl_version_string()); +#endif +#if 0 && defined(WITH_LZMA) + fprintf(f,"LZMA SDK version ???\n"); #endif fprintf(f,"Copyright (C) 1996-2006 Markus Franz Xaver Johannes Oberhumer\n"); fprintf(f,"Copyright (C) 1996-2006 Laszlo Molnar\n"); fprintf(f,"Copyright (C) 2000-2006 John F. Reiser\n"); fprintf(f,"Copyright (C) 2002-2006 Jens Medoch\n"); +#if defined(WITH_LZMA) + fprintf(f,"Copyright (C) 1999-2006 Igor Pavlov\n"); +#endif fprintf(f,"UPX comes with ABSOLUTELY NO WARRANTY; for details type `%s -L'.\n", progname); }