Skip to content

Commit 2524e76

Browse files
committed
Use ZSTD_LEGACY_SUPPORT=5 in make test
1 parent 8689633 commit 2524e76

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

lib/legacy/zstd_v02.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ extern "C" {
862862
* Streaming functions
863863
***************************************/
864864

865-
typedef struct ZSTD_DCtx_s ZSTD_DCtx;
865+
typedef struct ZSTDv02_Dctx_s ZSTD_DCtx;
866866

867867
/*
868868
Use above functions alternatively.
@@ -2737,7 +2737,7 @@ static unsigned ZSTD_isError(size_t code) { return ERR_isError(code); }
27372737
/* *************************************************************
27382738
* Decompression section
27392739
***************************************************************/
2740-
struct ZSTD_DCtx_s
2740+
struct ZSTDv02_Dctx_s
27412741
{
27422742
U32 LLTable[FSE_DTABLE_SIZE_U32(LLFSELog)];
27432743
U32 OffTable[FSE_DTABLE_SIZE_U32(OffFSELog)];

lib/legacy/zstd_v03.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ extern "C" {
862862
* Streaming functions
863863
***************************************/
864864

865-
typedef struct ZSTD_DCtx_s ZSTD_DCtx;
865+
typedef struct ZSTDv03_Dctx_s ZSTD_DCtx;
866866

867867
/*
868868
Use above functions alternatively.
@@ -2377,7 +2377,7 @@ static unsigned ZSTD_isError(size_t code) { return ERR_isError(code); }
23772377
/* *************************************************************
23782378
* Decompression section
23792379
***************************************************************/
2380-
struct ZSTD_DCtx_s
2380+
struct ZSTDv03_Dctx_s
23812381
{
23822382
U32 LLTable[FSE_DTABLE_SIZE_U32(LLFSELog)];
23832383
U32 OffTable[FSE_DTABLE_SIZE_U32(OffFSELog)];

tests/Makefile

+6-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# zstreamtest32: Same as zstreamtest, but forced to compile in 32-bits mode
2121
# ##########################################################################
2222

23-
ZSTD_LEGACY_SUPPORT ?= 0
23+
ZSTD_LEGACY_SUPPORT ?= 5
2424

2525
DEBUGLEVEL ?= 2
2626
export DEBUGLEVEL # transmit value to sub-makefiles
@@ -33,14 +33,15 @@ PYTHON ?= python3
3333
TESTARTEFACT := versionsTest
3434

3535
DEBUGFLAGS += -g -Wno-c++-compat
36-
CPPFLAGS += -I$(LIB_SRCDIR) -I$(LIB_SRCDIR)/common -I$(LIB_SRCDIR)/compress \
36+
CPPFLAGS += -I$(LIB_SRCDIR) -I$(LIB_SRCDIR)/common -I$(LIB_SRCDIR)/compress -I$(LIB_SRCDIR)/legacy \
3737
-I$(LIB_SRCDIR)/dictBuilder -I$(LIB_SRCDIR)/deprecated -I$(PRGDIR) \
3838
-DZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY=1
3939

4040
ZSTDCOMMON_FILES := $(sort $(ZSTD_COMMON_FILES))
4141
ZSTDCOMP_FILES := $(sort $(ZSTD_COMPRESS_FILES))
4242
ZSTDDECOMP_FILES := $(sort $(ZSTD_DECOMPRESS_FILES))
43-
ZSTD_FILES := $(ZSTDDECOMP_FILES) $(ZSTDCOMMON_FILES) $(ZSTDCOMP_FILES)
43+
ZSTDLEGACY_FILES := $(sort $(wildcard $(LIB_SRCDIR)/legacy/*.c))
44+
ZSTD_FILES := $(ZSTDDECOMP_FILES) $(ZSTDCOMMON_FILES) $(ZSTDCOMP_FILES) $(ZSTDLEGACY_FILES)
4445
ZDICT_FILES := $(sort $(ZSTD_DICTBUILDER_FILES))
4546

4647
ZSTD_F1 := $(sort $(wildcard $(ZSTD_FILES)))
@@ -222,8 +223,8 @@ CLEAN += invalidDictionaries
222223
invalidDictionaries : $(ZSTD_OBJECTS) invalidDictionaries.c
223224

224225
CLEAN += legacy
225-
legacy : CPPFLAGS += -I$(LIB_SRCDIR)/legacy -UZSTD_LEGACY_SUPPORT -DZSTD_LEGACY_SUPPORT=4
226-
legacy : $(ZSTD_FILES) $(sort $(wildcard $(LIB_SRCDIR)/legacy/*.c)) legacy.c
226+
legacy : CPPFLAGS += -UZSTD_LEGACY_SUPPORT -DZSTD_LEGACY_SUPPORT=4
227+
legacy : $(ZSTD_FILES) legacy.c
227228

228229
CLEAN += decodecorpus
229230
decodecorpus : LDLIBS += -lm

0 commit comments

Comments
 (0)