Cleanups.

This commit is contained in:
Markus F.X.J. Oberhumer
2016-09-24 12:10:46 +02:00
parent 2e8b649195
commit 6f33929f91
3 changed files with 18 additions and 33 deletions
+5 -11
View File
@@ -4,12 +4,10 @@
# Copyright (C) 1996-2016 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 1996-2016 Markus Franz Xaver Johannes Oberhumer
# #
# In GNU Make 4.0 this "MAKEFLAGS += -rR" is not executed immediately. # build configuration options
# Instead, it is executed later, and we cannot rely on sequentiality #USE_DEBUG = 1
# with respect to builtin variables. So if we want to have no #USE_SANITIZE = 1
# dependencies on the default values of builtin variables,
# then we cannot use builtin variables at all.
# See: http://lists.gnu.org/archive/html/help-make/2016-08/msg00011.html
MAKEFLAGS += -r MAKEFLAGS += -r
ifneq ($(upx_CXX),) ifneq ($(upx_CXX),)
CXX = $(upx_CXX) CXX = $(upx_CXX)
@@ -20,10 +18,6 @@ else
CXXLD = $(CXX) CXXLD = $(CXX)
endif endif
# build configuration options
#USE_DEBUG = 1
#USE_SANITIZE = 1
.SUFFIXES: .SUFFIXES:
export SHELL = /bin/sh export SHELL = /bin/sh
override e = $($1) $(EXTRA_$1) $(upx_$1) $($(basename $(notdir $@)).$1) override e = $($1) $(EXTRA_$1) $(upx_$1) $($(basename $(notdir $@)).$1)
@@ -104,7 +98,7 @@ ifeq (1,1)
@echo "Updating $@" @echo "Updating $@"
@$(strip $(CXX) $(call e,CPPFLAGS) -MM) $(filter %.cpp,$^) > $@ @$(strip $(CXX) $(call e,CPPFLAGS) -MM) $(filter %.cpp,$^) > $@
else else
touch $@ @echo "timestamp" > $@
endif endif
+1 -12
View File
@@ -66,11 +66,6 @@
#define ACC_WANT_ACC_LIB_H 1 #define ACC_WANT_ACC_LIB_H 1
#define ACC_WANT_ACC_CXX_H 1 #define ACC_WANT_ACC_CXX_H 1
#include "miniacc.h" #include "miniacc.h"
#if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
# if defined(INVALID_HANDLE_VALUE) || defined(MAKEWORD) || defined(RT_CURSOR)
# error "something pulled in <windows.h>"
# endif
#endif
/* intergral types */ /* intergral types */
typedef acc_int8_t upx_int8_t; typedef acc_int8_t upx_int8_t;
@@ -89,7 +84,7 @@ typedef acc_uintptr_t upx_uintptr_t;
#define UPX_INT64_C ACC_INT64_C #define UPX_INT64_C ACC_INT64_C
#define UPX_UINT64_C ACC_UINT64_C #define UPX_UINT64_C ACC_UINT64_C
#define upx_byte unsigned char typedef unsigned char upx_byte;
#define upx_bytep upx_byte * #define upx_bytep upx_byte *
@@ -615,9 +610,6 @@ struct upx_compress_result_t
**************************************************************************/ **************************************************************************/
#include "snprintf.h" #include "snprintf.h"
#if defined(__cplusplus)
#include "stdcxx.h" #include "stdcxx.h"
#include "options.h" #include "options.h"
#include "except.h" #include "except.h"
@@ -707,9 +699,6 @@ int upx_test_overlap ( const upx_bytep buf,
const upx_compress_result_t *cresult ); const upx_compress_result_t *cresult );
#endif /* __cplusplus */
#if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || 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_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
# if defined(INVALID_HANDLE_VALUE) || defined(MAKEWORD) || defined(RT_CURSOR) # if defined(INVALID_HANDLE_VALUE) || defined(MAKEWORD) || defined(RT_CURSOR)
# error "something pulled in <windows.h>" # error "something pulled in <windows.h>"
+12 -10
View File
@@ -1116,27 +1116,29 @@ void Packer::initLoader(const void *pdata, int plen, int small)
#define C const char * #define C const char *
#define N ACC_STATIC_CAST(void *, 0)
void Packer::addLoader(C a) void Packer::addLoader(C a)
{ addLoaderVA(a, NULL); } { addLoaderVA(a, N); }
void Packer::addLoader(C a, C b) void Packer::addLoader(C a, C b)
{ addLoaderVA(a, b, NULL); } { addLoaderVA(a, b, N); }
void Packer::addLoader(C a, C b, C c) void Packer::addLoader(C a, C b, C c)
{ addLoaderVA(a, b, c, NULL); } { addLoaderVA(a, b, c, N); }
void Packer::addLoader(C a, C b, C c, C d) void Packer::addLoader(C a, C b, C c, C d)
{ addLoaderVA(a, b, c, d, NULL); } { addLoaderVA(a, b, c, d, N); }
void Packer::addLoader(C a, C b, C c, C d, C e) void Packer::addLoader(C a, C b, C c, C d, C e)
{ addLoaderVA(a, b, c, d, e, NULL); } { addLoaderVA(a, b, c, d, e, N); }
void Packer::addLoader(C a, C b, C c, C d, C e, C f) void Packer::addLoader(C a, C b, C c, C d, C e, C f)
{ addLoaderVA(a, b, c, d, e, f, NULL); } { addLoaderVA(a, b, c, d, e, f, N); }
void Packer::addLoader(C a, C b, C c, C d, C e, C f, C g) void Packer::addLoader(C a, C b, C c, C d, C e, C f, C g)
{ addLoaderVA(a, b, c, d, e, f, g, NULL); } { addLoaderVA(a, b, c, d, e, f, g, N); }
void Packer::addLoader(C a, C b, C c, C d, C e, C f, C g, C h) void Packer::addLoader(C a, C b, C c, C d, C e, C f, C g, C h)
{ addLoaderVA(a, b, c, d, e, f, g, h, NULL); } { addLoaderVA(a, b, c, d, e, f, g, h, N); }
void Packer::addLoader(C a, C b, C c, C d, C e, C f, C g, C h, C i) void Packer::addLoader(C a, C b, C c, C d, C e, C f, C g, C h, C i)
{ addLoaderVA(a, b, c, d, e, f, g, h, i, NULL); } { addLoaderVA(a, b, c, d, e, f, g, h, i, N); }
void Packer::addLoader(C a, C b, C c, C d, C e, C f, C g, C h, C i, C j) void Packer::addLoader(C a, C b, C c, C d, C e, C f, C g, C h, C i, C j)
{ addLoaderVA(a, b, c, d, e, f, g, h, i, j, NULL); } { addLoaderVA(a, b, c, d, e, f, g, h, i, j, N); }
#undef C #undef C
#undef N
void __acc_cdecl_va Packer::addLoaderVA(const char *s, ...) void __acc_cdecl_va Packer::addLoaderVA(const char *s, ...)
{ {