Skip to content

Commit

Permalink
Use ZSTD_LEGACY_SUPPORT=5 in make test
Browse files Browse the repository at this point in the history
  • Loading branch information
embg committed Mar 11, 2024
1 parent 8689633 commit 2524e76
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/legacy/zstd_v02.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ extern "C" {
* Streaming functions
***************************************/

typedef struct ZSTD_DCtx_s ZSTD_DCtx;
typedef struct ZSTDv02_Dctx_s ZSTD_DCtx;

/*
Use above functions alternatively.
Expand Down Expand Up @@ -2737,7 +2737,7 @@ static unsigned ZSTD_isError(size_t code) { return ERR_isError(code); }
/* *************************************************************
* Decompression section
***************************************************************/
struct ZSTD_DCtx_s
struct ZSTDv02_Dctx_s
{
U32 LLTable[FSE_DTABLE_SIZE_U32(LLFSELog)];
U32 OffTable[FSE_DTABLE_SIZE_U32(OffFSELog)];
Expand Down
4 changes: 2 additions & 2 deletions lib/legacy/zstd_v03.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ extern "C" {
* Streaming functions
***************************************/

typedef struct ZSTD_DCtx_s ZSTD_DCtx;
typedef struct ZSTDv03_Dctx_s ZSTD_DCtx;

/*
Use above functions alternatively.
Expand Down Expand Up @@ -2377,7 +2377,7 @@ static unsigned ZSTD_isError(size_t code) { return ERR_isError(code); }
/* *************************************************************
* Decompression section
***************************************************************/
struct ZSTD_DCtx_s
struct ZSTDv03_Dctx_s
{
U32 LLTable[FSE_DTABLE_SIZE_U32(LLFSELog)];
U32 OffTable[FSE_DTABLE_SIZE_U32(OffFSELog)];
Expand Down
11 changes: 6 additions & 5 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# zstreamtest32: Same as zstreamtest, but forced to compile in 32-bits mode
# ##########################################################################

ZSTD_LEGACY_SUPPORT ?= 0
ZSTD_LEGACY_SUPPORT ?= 5

DEBUGLEVEL ?= 2
export DEBUGLEVEL # transmit value to sub-makefiles
Expand All @@ -33,14 +33,15 @@ PYTHON ?= python3
TESTARTEFACT := versionsTest

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

ZSTDCOMMON_FILES := $(sort $(ZSTD_COMMON_FILES))
ZSTDCOMP_FILES := $(sort $(ZSTD_COMPRESS_FILES))
ZSTDDECOMP_FILES := $(sort $(ZSTD_DECOMPRESS_FILES))
ZSTD_FILES := $(ZSTDDECOMP_FILES) $(ZSTDCOMMON_FILES) $(ZSTDCOMP_FILES)
ZSTDLEGACY_FILES := $(sort $(wildcard $(LIB_SRCDIR)/legacy/*.c))
ZSTD_FILES := $(ZSTDDECOMP_FILES) $(ZSTDCOMMON_FILES) $(ZSTDCOMP_FILES) $(ZSTDLEGACY_FILES)
ZDICT_FILES := $(sort $(ZSTD_DICTBUILDER_FILES))

ZSTD_F1 := $(sort $(wildcard $(ZSTD_FILES)))
Expand Down Expand Up @@ -222,8 +223,8 @@ CLEAN += invalidDictionaries
invalidDictionaries : $(ZSTD_OBJECTS) invalidDictionaries.c

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

CLEAN += decodecorpus
decodecorpus : LDLIBS += -lm
Expand Down

0 comments on commit 2524e76

Please sign in to comment.