1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

Small Watcom updates.

This commit is contained in:
Markus F.X.J. Oberhumer 2007-01-31 14:28:15 +01:00
parent 6e5f5732b5
commit 78364ac830
2 changed files with 27 additions and 9 deletions

View File

@ -23,7 +23,7 @@ endif
-include $(top_srcdir)/Makevars.global ./Makevars.local
vpath %.c $(top_srcdir)/src/stub/src/c
export WATCOM ?= /opt/cc-i386-linux/watcom/open-watcom-1.6
##export WATCOM ?= /opt/cc-i386-linux/watcom/open-watcom-1.6
STUBS =
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
@ -48,17 +48,19 @@ lzma_d_c%.S : tc_list = method-lzma default
lzma_d_c%.S : tc_bfdname =
c := tc.method-lzma.wcc
$c = $(WATCOM)/binl/wcc -zq -0
$c += -mh
$c = $(WATCOM)/binl/wcc -zq -bt=dos -0
$c += -mc
$c += -zm -zc
$c += -os -s -d0
$c += -w5 -we -fr=/dev/null
$c += -D__INT_MAX__=32767
$c += -D_LZMA_UINT32_IS_ULONG=1
$c += -I$(UPX_LZMADIR)
$c += -I$(top_srcdir)/src
tc.method-lzma.wdis = $(WATCOM)/binl/wdis
tc.method-lzma.wdump = $(WATCOM)/binl/wdump
tc.method-lzma.dmpobj = $(WATCOM)/binl/dmpobj
tc.method-lzma.wdis = $(WATCOM)/binl/wdis
tc.method-lzma.wdump = $(WATCOM)/binl/wdump
lzma_d_c%.S : lzma_d_c.c
$(call tc,wcc) $(PP_FLAGS) -fo=tmp/$T.obj $<
@ -73,3 +75,5 @@ FIXME:
lzma_d_cf.% : PP_FLAGS = -DFAST
lzma_d_cs.% : PP_FLAGS = -DSMALL
lzma_d_cf.% : LABEL_PREFIX = .Lf
lzma_d_cs.% : LABEL_PREFIX = .Ls

View File

@ -30,7 +30,7 @@
**************************************************************************/
#define ACC_LIBC_NAKED 1
#define ACC_OS_FREESTANDING 1
/*#define ACC_OS_FREESTANDING 1*/
#include "miniacc.h"
#if 0
@ -39,6 +39,10 @@
#undef _LZMA_PROB32
#undef _LZMA_LOC_OPT
#endif
#if (ACC_ARCH_I086) && (ACC_CC_WATCOMC)
typedef unsigned char __huge Byte;
# define _7ZIP_BYTE_DEFINED 1
#endif
#if 0
@ -51,10 +55,12 @@ ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16)
#else
#define CLzmaDecoderState CLzmaDecoderState_dummy
#define LzmaDecode LzmaDecode_dummy
#define CLzmaDecoderState CLzmaDecoderState_dummy
#define LzmaDecodeProperties LzmaDecodeProperties_dummy
#define LzmaDecode LzmaDecode_dummy
#include "C/7zip/Compress/LZMA_C/LzmaDecode.h"
#undef CLzmaDecoderState
#undef LzmaDecodeProperties
#undef LzmaDecode
typedef struct {
struct { unsigned char lc, lp, pb, dummy; } Properties;
@ -65,8 +71,16 @@ typedef struct {
#endif
} CLzmaDecoderState;
ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 32768)
ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(SizeT) >= 4)
#if defined(__WATCOMC__)
#if (ACC_ARCH_I086) && (ACC_CC_WATCOMC)
# if (ACC_MM_HUGE)
typedef unsigned short __far MyCProb;
# undef CProb
# define CProb MyCProb
# endif
# define char char __huge
#elif (ACC_CC_WATCOMC)
#else
#define CLzmaDecoderState const CLzmaDecoderState
#endif