1
0
mirror of https://github.com/upx/upx synced 2025-10-05 19:20:23 +08:00

Added support for LZMA SDK 4.57. Compiles, but pretty much untested.

This commit is contained in:
Markus F.X.J. Oberhumer 2007-12-17 05:54:08 +01:00
parent 30a98b7e8c
commit e4f4eace1c
3 changed files with 9 additions and 5 deletions

View File

@ -545,12 +545,14 @@ int upx_lzma_test_overlap ( const upx_bytep buf,
const char *upx_lzma_version_string(void) const char *upx_lzma_version_string(void)
{ {
#if (WITH_LZMA == 0x449) #if (WITH_LZMA + 0 == 0x457)
return "4.57";
#elif (WITH_LZMA + 0 == 0x449)
return "4.49"; return "4.49";
#elif (WITH_LZMA == 0x443) #elif (WITH_LZMA + 0 == 0x443)
return "4.43"; return "4.43";
#else #else
# error "unknown version" # error "unknown WITH_LZMA version"
return NULL; return NULL;
#endif #endif
} }

View File

@ -107,7 +107,7 @@ $c += -O1 -1
$c += -w $c += -w
$c += -D__INT_MAX__=32767 $c += -D__INT_MAX__=32767
$c += -DWITH_LZMA=$(UPX_LZMA_VERSION) $c += -DWITH_LZMA=$(UPX_LZMA_VERSION)
ifeq ($(UPX_LZMA_VERSION),0x449) ifneq ($(findstring .$(UPX_LZMA_VERSION).,.0x449.0x457.),)
$c += -I$(subst \,/,$(call winedir_w,$(UPX_LZMADIR)/C/Compress/Lzma)) $c += -I$(subst \,/,$(call winedir_w,$(UPX_LZMADIR)/C/Compress/Lzma))
else else
$c += -I$(subst \,/,$(call winedir_w,$(UPX_LZMADIR)/C/7zip/Compress/LZMA_C)) $c += -I$(subst \,/,$(call winedir_w,$(UPX_LZMADIR)/C/7zip/Compress/LZMA_C))

View File

@ -1,7 +1,9 @@
# you should set envvar UPX_LZMADIR to point to your unpacked LZMA SDK lzma443.tar.bz2 # you should set envvar UPX_LZMADIR to point to your unpacked LZMA SDK lzma443.tar.bz2
# NOTE: only version 4.43 is currently sufficiently tested ! # NOTE: only version 4.43 is currently sufficiently tested !
ifneq ($(wildcard $(UPX_LZMADIR)/CPP/7zip/.),) ifneq ($(wildcard $(UPX_LZMADIR)/C/CpuArch.h),)
UPX_LZMA_VERSION = 0x457
else ifneq ($(wildcard $(UPX_LZMADIR)/CPP/7zip/.),)
UPX_LZMA_VERSION = 0x449 UPX_LZMA_VERSION = 0x449
else ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),) else ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
UPX_LZMA_VERSION = 0x443 UPX_LZMA_VERSION = 0x443