diff --git a/.hgignore b/.hgignore index 3956500b..ad9c145a 100644 --- a/.hgignore +++ b/.hgignore @@ -10,6 +10,7 @@ syntax: glob .depend *.qtcreator.{config,creator,creator.user,files,includes} +*.sublime-{project,workspace} Makevars.local *.a diff --git a/NEWS b/NEWS index 741920a1..de56c338 100644 --- a/NEWS +++ b/NEWS @@ -2,7 +2,7 @@ User visible changes for UPX ================================================================== -Changes in 3.91 (27 Sep 2013): +Changes in 3.91 (30 Sep 2013): * Added experimental support for Windows 64-bit PE files, based on work by Stefan Widmann. Please use for testing only! * bug fixes diff --git a/src/compress_lzma.cpp b/src/compress_lzma.cpp index 48cedf96..decca78e 100644 --- a/src/compress_lzma.cpp +++ b/src/compress_lzma.cpp @@ -230,6 +230,7 @@ error: **************************************************************************/ #if (WITH_LZMA >= 0x461) +#define _7ZIP_ST 1 #define kLiteralNextStates kLiteralNextStates_enc #include "C/LzmaEnc.h" #include "C/LzmaEnc.c" diff --git a/src/conf.h b/src/conf.h index ad27b7e3..980433dc 100644 --- a/src/conf.h +++ b/src/conf.h @@ -150,17 +150,21 @@ #endif /* intergral types */ -#define upx_int8_t acc_int8_t -#define upx_uint8_t acc_uint8_t -#define upx_int16_t acc_int16_t -#define upx_uint16_t acc_uint16_t -#define upx_int32_t acc_int32_t -#define upx_uint32_t acc_uint32_t -#define upx_int64_t acc_int64_t -#define upx_uint64_t acc_uint64_t +typedef acc_int8_t upx_int8_t; +typedef acc_uint8_t upx_uint8_t; +typedef acc_int16_t upx_int16_t; +typedef acc_uint16_t upx_uint16_t; +typedef acc_int32_t upx_int32_t; +typedef acc_uint32_t upx_uint32_t; +typedef acc_int64_t upx_int64_t; +typedef acc_uint64_t upx_uint64_t; +typedef acc_uintptr_t upx_uintptr_t; +#define UPX_INT16_C ACC_INT16_C +#define UPX_UINT16_C ACC_UINT16_C +#define UPX_INT32_C ACC_INT32_C +#define UPX_UINT32_C ACC_UINT32_C #define UPX_INT64_C ACC_INT64_C #define UPX_UINT64_C ACC_UINT64_C -#define upx_uintptr_t acc_uintptr_t /************************************************************************* diff --git a/src/except.cpp b/src/except.cpp index 6c2794b2..734f6b52 100644 --- a/src/except.cpp +++ b/src/except.cpp @@ -33,7 +33,7 @@ // **************************************************************************/ -long Throwable::counter = 0; +unsigned long Throwable::counter = 0; Throwable::Throwable(const char *m, int e, bool w) NOTHROW : super(), msg(NULL), err(e), is_warning(w) @@ -41,7 +41,7 @@ Throwable::Throwable(const char *m, int e, bool w) NOTHROW if (m) msg = strdup(m); #if 0 - fprintf(stderr, "construct exception: %s %ld\n", msg, counter); + fprintf(stderr, "construct exception: %s %lu\n", msg, counter); counter++; #endif } @@ -53,7 +53,7 @@ Throwable::Throwable(const Throwable &other) NOTHROW if (other.msg) msg = strdup(other.msg); #if 0 - fprintf(stderr, "copy exception: %s %ld\n", msg, counter); + fprintf(stderr, "copy exception: %s %lu\n", msg, counter); counter++; #endif } @@ -63,7 +63,7 @@ Throwable::~Throwable() NOTHROW { #if 0 counter--; - fprintf(stderr, "destruct exception: %s %ld\n", msg, counter); + fprintf(stderr, "destruct exception: %s %lu\n", msg, counter); #endif if (msg) free(msg); diff --git a/src/except.h b/src/except.h index 61fd4b25..c2ea0f5d 100644 --- a/src/except.h +++ b/src/except.h @@ -62,7 +62,7 @@ private: DISABLE_NEW_DELETE private: - static long counter; // for debugging + static unsigned long counter; // for debugging }; diff --git a/src/snprintf.cpp b/src/snprintf.cpp index 206a1899..147994f5 100644 --- a/src/snprintf.cpp +++ b/src/snprintf.cpp @@ -72,7 +72,7 @@ #undef LLONG #undef ULLONG -#if 1 && defined(upx_int64_t) +#if 1 # define LLONG upx_int64_t # define ULLONG upx_uint64_t #else @@ -798,7 +798,7 @@ static int xdopr(char *buffer, size_t maxlen, const char *format, va_list args) } -int __acc_cdecl upx_vsnprintf(char *str, size_t count, const char *format, va_list ap) +int upx_vsnprintf(char *str, size_t count, const char *format, va_list ap) { return xdopr(str, count, format, ap); } @@ -816,7 +816,7 @@ int __acc_cdecl_va upx_snprintf(char *str, size_t count, const char *format,...) } -int __acc_cdecl upx_vasprintf(char **ptr, const char *format, va_list ap) +int upx_vasprintf(char **ptr, const char *format, va_list ap) { int ret; diff --git a/src/snprintf.h b/src/snprintf.h index 89223659..152b2216 100644 --- a/src/snprintf.h +++ b/src/snprintf.h @@ -38,9 +38,9 @@ extern "C" { // **************************************************************************/ -int __acc_cdecl upx_vsnprintf(char *str, size_t count, const char *format, va_list ap); +int upx_vsnprintf(char *str, size_t count, const char *format, va_list ap); int __acc_cdecl_va upx_snprintf(char *str, size_t count, const char *format,...); -int __acc_cdecl upx_vasprintf(char **ptr, const char *format, va_list ap); +int upx_vasprintf(char **ptr, const char *format, va_list ap); int __acc_cdecl_va upx_asprintf(char **ptr, const char *format, ...); #if 1 diff --git a/src/util.cpp b/src/util.cpp index 29174d4b..339000ea 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -562,15 +562,7 @@ unsigned get_ratio(unsigned u_len, unsigned c_len) const unsigned n = 1000000; if (u_len <= 0) return c_len <= 0 ? 0 : n; -#if defined(upx_uint64_t) return (unsigned) ((c_len * (upx_uint64_t)n) / u_len); -#else -# if 0 - return (unsigned) acc_umuldiv32(c_len, n, u_len); -# else - return (unsigned) ((c_len * (double)n) / u_len); -# endif -#endif } diff --git a/src/version.h b/src/version.h index f50047b8..3d8092b2 100644 --- a/src/version.h +++ b/src/version.h @@ -1,6 +1,6 @@ #define UPX_VERSION_HEX 0x035b00 /* 03.91.00 */ #define UPX_VERSION_STRING "3.91" #define UPX_VERSION_STRING4 "3.91" -#define UPX_VERSION_DATE "Sep 27th 2013" -#define UPX_VERSION_DATE_ISO "2013-09-27" +#define UPX_VERSION_DATE "Sep 30th 2013" +#define UPX_VERSION_DATE_ISO "2013-09-30" #define UPX_VERSION_YEAR "2013"