Cleanups.

committer: mfx <mfx> 1059739807 +0000
This commit is contained in:
Markus F.X.J. Oberhumer
2003-08-01 12:10:07 +00:00
parent ab37b5ea0c
commit 365a3c0432
8 changed files with 20 additions and 12 deletions
+2 -2
View File
@@ -419,7 +419,7 @@ ifeq ($(DEBUG),1)
CFLAGS += -Od -ZI CFLAGS += -Od -ZI
LINK_EXE_LDFLAGS += /debug LINK_EXE_LDFLAGS += /debug
else else
CFLAGS += -O1 -GF -Gy CFLAGS += -O1 -GF
LINK_EXE_LDFLAGS += /release LINK_EXE_LDFLAGS += /release
endif endif
RESOURCES := $(subst .rc,.res,$(notdir $(wildcard $(srcdir)/*.rc))) RESOURCES := $(subst .rc,.res,$(notdir $(wildcard $(srcdir)/*.rc)))
@@ -491,7 +491,7 @@ ifeq ($(DEBUG),1)
CFLAGS += -Od -ZI CFLAGS += -Od -ZI
LINK_EXE_LDFLAGS += /debug LINK_EXE_LDFLAGS += /debug
else else
CFLAGS += -O1 -GF -Gy CFLAGS += -O1 -GF
LINK_EXE_LDFLAGS += /release LINK_EXE_LDFLAGS += /release
##LINK_EXE_LDFLAGS += /opt:nowin98 ##LINK_EXE_LDFLAGS += /opt:nowin98
endif endif
+1 -1
View File
@@ -282,7 +282,7 @@
#undef __attribute_packed #undef __attribute_packed
#if defined(__GNUC__) || defined(__INTEL_COMPILER) #if defined(__GNUC__) || defined(__INTEL_COMPILER)
# if (1 && ACC_ARCH_IA32) # if (1 && (ACC_ARCH_IA32 || ACC_ARCH_IA64))
# define __attribute_packed # define __attribute_packed
# else # else
# define __attribute_packed __attribute__((__packed__,__aligned__(1))) # define __attribute_packed __attribute__((__packed__,__aligned__(1)))
+1 -1
View File
@@ -139,7 +139,7 @@ void MemBuffer::fill(unsigned off, unsigned len, int value)
// //
**************************************************************************/ **************************************************************************/
#define PTR(p) ((unsigned)(p) & 0xffffffff) #define PTR(p) ((unsigned) ((acc_uintptr_t)(p) & 0xffffffff))
#define MAGIC1(p) (PTR(p) ^ 0xfefdbeeb) #define MAGIC1(p) (PTR(p) ^ 0xfefdbeeb)
#define MAGIC2(p) (PTR(p) ^ 0xfefdbeeb ^ 0x80024001) #define MAGIC2(p) (PTR(p) ^ 0xfefdbeeb ^ 0x80024001)
+3
View File
@@ -76,6 +76,9 @@ PackPs1::PackPs1(InputFile *f) :
COMPILE_TIME_ASSERT(sizeof(ps1_exe_t) == 188); COMPILE_TIME_ASSERT(sizeof(ps1_exe_t) == 188);
COMPILE_TIME_ASSERT(PS_HDR_SIZE > sizeof(ps1_exe_t)); COMPILE_TIME_ASSERT(PS_HDR_SIZE > sizeof(ps1_exe_t));
COMPILE_TIME_ASSERT(SZ_IH_BKUP == 40); COMPILE_TIME_ASSERT(SZ_IH_BKUP == 40);
#if defined(WITH_NRV)
COMPILE_TIME_ASSERT(NRV_LOADER_CRC32 == 0xd78b1eb4);
#endif
fdata_size = file_size - PS_HDR_SIZE; fdata_size = file_size - PS_HDR_SIZE;
} }
+2 -2
View File
@@ -703,7 +703,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
strvalue = va_arg (args, const char *); strvalue = va_arg (args, const char *);
if (!strvalue) strvalue = "(NULL)"; if (!strvalue) strvalue = "(NULL)";
if (max == -1) { if (max == -1) {
max = strlen(strvalue); max = (int) strlen(strvalue);
} }
if (min > 0 && max >= 0 && min > max) max = min; if (min > 0 && max >= 0 && min > max) max = min;
fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max); fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max);
@@ -728,7 +728,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
} else { } else {
int *num; int *num;
num = va_arg (args, int *); num = va_arg (args, int *);
*num = currlen; *num = (int) currlen;
} }
break; break;
case '%': case '%':
+2 -2
View File
@@ -71,8 +71,8 @@ vpath %.ash $(UCL_MR3K)
# // tools # // tools
# ************************************************************************/ # ************************************************************************/
NASM = nasm -O2 -w+macro-params -w+orphan-labels NASM = nasm -O2 -w+macro-params -w+macro-selfref -w+number-overflow -w+orphan-labels
NASM += -i$(srcdir)/ NASM += -I$(srcdir)/
APP_I386 = perl -w $(srcdir)/scripts/app_i386.pl APP_I386 = perl -w $(srcdir)/scripts/app_i386.pl
BIN2H = perl -w $(srcdir)/scripts/bin2h.pl BIN2H = perl -w $(srcdir)/scripts/bin2h.pl
+1 -1
View File
@@ -454,7 +454,7 @@ void UiPacker::doCallback(unsigned isize, unsigned osize)
if (osize > 0) if (osize > 0)
ratio = get_ratio(isize, osize); ratio = get_ratio(isize, osize);
int buflen = &s->msg_buf[sizeof(s->msg_buf)] - m; int buflen = (int) (&s->msg_buf[sizeof(s->msg_buf)] - m);
upx_snprintf(m, buflen, " %3d.%1d%% %c ", upx_snprintf(m, buflen, " %3d.%1d%% %c ",
ratio / 10000, (ratio % 10000) / 1000, ratio / 10000, (ratio % 10000) / 1000,
spinner[s->spin_counter & 3]); spinner[s->spin_counter & 3]);
+6 -1
View File
@@ -35,7 +35,12 @@
/* avoid -W4 warnings in <windows.h> */ /* avoid -W4 warnings in <windows.h> */
# pragma warning(disable: 4201 4214 4514) # pragma warning(disable: 4201 4214 4514)
#endif #endif
#if 0
# include "acc/acc_lib.ch" # include "acc/acc_lib.ch"
#else
# include "acc/acc_inci.h"
# include "acc/acclib/misc.ch"
#endif
/************************************************************************* /*************************************************************************
@@ -246,7 +251,7 @@ int upx_tolower(int c)
// filename util // filename util
**************************************************************************/ **************************************************************************/
#if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_TOS || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64) #if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS16 || ACC_OS_TOS || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
static const char dir_sep[] = "/\\"; static const char dir_sep[] = "/\\";
#define fn_is_drive(s) (s[0] && s[1] == ':') #define fn_is_drive(s) (s[0] && s[1] == ':')