My working unpac space for OCaml projects in development
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #4554 from facebook/no_legacy

Remove legacy support by default

authored by

Yann Collet and committed by
GitHub
9325c2ec 612c188d

+67 -45
+4
vendor/git/zstd-c/CHANGELOG
··· 1 + v1.6.0 (Dec 2025) 2 + api: legacy format support is now disabled by default 3 + build: `ZSTD_LEGACY_SUPPORT` defaults to `0` in Makefile and CMake 4 + 1 5 V1.5.7 (Feb 2025) 2 6 fix: compression bug in 32-bit mode associated with long-lasting sessions 3 7 api: new method `ZSTD_compressSequencesAndLiterals()` (#4217, #4232)
+4 -4
vendor/git/zstd-c/build/VS2008/zstd/zstd.vcproj
··· 45 45 Name="VCCLCompilerTool" 46 46 Optimization="0" 47 47 AdditionalIncludeDirectories="$(SolutionDir)..\..\lib;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\dictBuilder;$(SolutionDir)..\..\lib\compress" 48 - PreprocessorDefinitions="ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE" 48 + PreprocessorDefinitions="ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;_DEBUG;_CONSOLE" 49 49 MinimalRebuild="true" 50 50 BasicRuntimeChecks="3" 51 51 RuntimeLibrary="3" ··· 122 122 EnableIntrinsicFunctions="true" 123 123 OmitFramePointers="true" 124 124 AdditionalIncludeDirectories="$(SolutionDir)..\..\lib;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\dictBuilder;$(SolutionDir)..\..\lib\compress" 125 - PreprocessorDefinitions="ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE" 125 + PreprocessorDefinitions="ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;NDEBUG;_CONSOLE" 126 126 RuntimeLibrary="0" 127 127 EnableFunctionLevelLinking="true" 128 128 UsePrecompiledHeader="0" ··· 197 197 Name="VCCLCompilerTool" 198 198 Optimization="0" 199 199 AdditionalIncludeDirectories="$(SolutionDir)..\..\lib;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\dictBuilder;$(SolutionDir)..\..\lib\compress" 200 - PreprocessorDefinitions="ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE" 200 + PreprocessorDefinitions="ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;_DEBUG;_CONSOLE" 201 201 MinimalRebuild="true" 202 202 BasicRuntimeChecks="3" 203 203 RuntimeLibrary="3" ··· 275 275 EnableIntrinsicFunctions="true" 276 276 OmitFramePointers="true" 277 277 AdditionalIncludeDirectories="$(SolutionDir)..\..\lib;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib\dictBuilder;$(SolutionDir)..\..\lib\compress" 278 - PreprocessorDefinitions="ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE" 278 + PreprocessorDefinitions="ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;NDEBUG;_CONSOLE" 279 279 RuntimeLibrary="0" 280 280 EnableFunctionLevelLinking="true" 281 281 UsePrecompiledHeader="0"
+4 -4
vendor/git/zstd-c/build/VS2008/zstdlib/zstdlib.vcproj
··· 45 45 Name="VCCLCompilerTool" 46 46 Optimization="0" 47 47 AdditionalIncludeDirectories="$(SolutionDir)..\..\lib;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\dictBuilder" 48 - PreprocessorDefinitions="ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE" 48 + PreprocessorDefinitions="ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;_DEBUG;_CONSOLE" 49 49 MinimalRebuild="true" 50 50 BasicRuntimeChecks="3" 51 51 RuntimeLibrary="3" ··· 121 121 EnableIntrinsicFunctions="true" 122 122 OmitFramePointers="true" 123 123 AdditionalIncludeDirectories="$(SolutionDir)..\..\lib;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\dictBuilder" 124 - PreprocessorDefinitions="ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE" 124 + PreprocessorDefinitions="ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;NDEBUG;_CONSOLE" 125 125 RuntimeLibrary="0" 126 126 EnableFunctionLevelLinking="true" 127 127 UsePrecompiledHeader="0" ··· 195 195 Name="VCCLCompilerTool" 196 196 Optimization="0" 197 197 AdditionalIncludeDirectories="$(SolutionDir)..\..\lib;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\dictBuilder" 198 - PreprocessorDefinitions="ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE" 198 + PreprocessorDefinitions="ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;_DEBUG;_CONSOLE" 199 199 MinimalRebuild="true" 200 200 BasicRuntimeChecks="3" 201 201 RuntimeLibrary="3" ··· 272 272 EnableIntrinsicFunctions="true" 273 273 OmitFramePointers="true" 274 274 AdditionalIncludeDirectories="$(SolutionDir)..\..\lib;$(SolutionDir)..\..\lib\common;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\dictBuilder" 275 - PreprocessorDefinitions="ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE" 275 + PreprocessorDefinitions="ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;NDEBUG;_CONSOLE" 276 276 RuntimeLibrary="0" 277 277 EnableFunctionLevelLinking="true" 278 278 UsePrecompiledHeader="0"
+4 -4
vendor/git/zstd-c/build/VS2010/libzstd-dll/libzstd-dll.vcxproj
··· 169 169 </PrecompiledHeader> 170 170 <WarningLevel>Level4</WarningLevel> 171 171 <Optimization>Disabled</Optimization> 172 - <PreprocessorDefinitions>ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 172 + <PreprocessorDefinitions>ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 173 173 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> 174 174 <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> 175 175 <DebugInformationFormat>EditAndContinue</DebugInformationFormat> ··· 188 188 </PrecompiledHeader> 189 189 <WarningLevel>Level4</WarningLevel> 190 190 <Optimization>Disabled</Optimization> 191 - <PreprocessorDefinitions>ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 191 + <PreprocessorDefinitions>ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 192 192 <TreatWarningAsError>true</TreatWarningAsError> 193 193 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> 194 194 <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> ··· 208 208 <Optimization>MaxSpeed</Optimization> 209 209 <FunctionLevelLinking>true</FunctionLevelLinking> 210 210 <IntrinsicFunctions>true</IntrinsicFunctions> 211 - <PreprocessorDefinitions>ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 211 + <PreprocessorDefinitions>ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 212 212 <EnablePREfast>false</EnablePREfast> 213 213 <RuntimeLibrary>MultiThreaded</RuntimeLibrary> 214 214 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> ··· 229 229 <Optimization>MaxSpeed</Optimization> 230 230 <FunctionLevelLinking>true</FunctionLevelLinking> 231 231 <IntrinsicFunctions>true</IntrinsicFunctions> 232 - <PreprocessorDefinitions>ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 232 + <PreprocessorDefinitions>ZSTD_DLL_EXPORT=1;ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 233 233 <TreatWarningAsError>false</TreatWarningAsError> 234 234 <EnablePREfast>false</EnablePREfast> 235 235 <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+4 -4
vendor/git/zstd-c/build/VS2010/libzstd/libzstd.vcxproj
··· 162 162 </PrecompiledHeader> 163 163 <WarningLevel>Level4</WarningLevel> 164 164 <Optimization>Disabled</Optimization> 165 - <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 165 + <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 166 166 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> 167 167 <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> 168 168 <DebugInformationFormat>EditAndContinue</DebugInformationFormat> ··· 181 181 </PrecompiledHeader> 182 182 <WarningLevel>Level4</WarningLevel> 183 183 <Optimization>Disabled</Optimization> 184 - <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 184 + <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 185 185 <TreatWarningAsError>true</TreatWarningAsError> 186 186 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> 187 187 <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> ··· 201 201 <Optimization>MaxSpeed</Optimization> 202 202 <FunctionLevelLinking>true</FunctionLevelLinking> 203 203 <IntrinsicFunctions>true</IntrinsicFunctions> 204 - <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 204 + <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 205 205 <EnablePREfast>false</EnablePREfast> 206 206 <RuntimeLibrary>MultiThreaded</RuntimeLibrary> 207 207 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> ··· 222 222 <Optimization>MaxSpeed</Optimization> 223 223 <FunctionLevelLinking>true</FunctionLevelLinking> 224 224 <IntrinsicFunctions>true</IntrinsicFunctions> 225 - <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 225 + <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> 226 226 <TreatWarningAsError>false</TreatWarningAsError> 227 227 <EnablePREfast>false</EnablePREfast> 228 228 <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+4 -4
vendor/git/zstd-c/build/VS2010/zstd/zstd.vcxproj
··· 187 187 </PrecompiledHeader> 188 188 <WarningLevel>Level4</WarningLevel> 189 189 <Optimization>Disabled</Optimization> 190 - <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 190 + <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 191 191 <TreatWarningAsError>true</TreatWarningAsError> 192 192 <EnablePREfast>false</EnablePREfast> 193 193 <EnableEnhancedInstructionSet>$(InstructionSet)</EnableEnhancedInstructionSet> ··· 204 204 </PrecompiledHeader> 205 205 <WarningLevel>Level4</WarningLevel> 206 206 <Optimization>Disabled</Optimization> 207 - <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 207 + <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 208 208 <TreatWarningAsError>true</TreatWarningAsError> 209 209 <EnablePREfast>false</EnablePREfast> 210 210 <EnableEnhancedInstructionSet>$(InstructionSet)</EnableEnhancedInstructionSet> ··· 223 223 <Optimization>MaxSpeed</Optimization> 224 224 <FunctionLevelLinking>true</FunctionLevelLinking> 225 225 <IntrinsicFunctions>true</IntrinsicFunctions> 226 - <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 226 + <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 227 227 <EnablePREfast>false</EnablePREfast> 228 228 <TreatWarningAsError>false</TreatWarningAsError> 229 229 <RuntimeLibrary>MultiThreaded</RuntimeLibrary> ··· 245 245 <Optimization>MaxSpeed</Optimization> 246 246 <FunctionLevelLinking>true</FunctionLevelLinking> 247 247 <IntrinsicFunctions>true</IntrinsicFunctions> 248 - <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 248 + <PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> 249 249 <TreatWarningAsError>false</TreatWarningAsError> 250 250 <EnablePREfast>false</EnablePREfast> 251 251 <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+2 -2
vendor/git/zstd-c/build/cmake/CMakeModules/ZstdOptions.cmake
··· 2 2 # ZSTD Build Options Configuration 3 3 # ################################################################ 4 4 5 - # Legacy support configuration 6 - option(ZSTD_LEGACY_SUPPORT "Enable legacy format support" ON) 5 + # Legacy support configuration (disabled by default) 6 + option(ZSTD_LEGACY_SUPPORT "Enable legacy format support" OFF) 7 7 8 8 if(ZSTD_LEGACY_SUPPORT) 9 9 message(STATUS "ZSTD_LEGACY_SUPPORT enabled")
+2 -2
vendor/git/zstd-c/build/meson/meson_options.txt
··· 10 10 11 11 # Read guidelines from https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting 12 12 13 - option('legacy_level', type: 'integer', min: 0, max: 7, value: 5, 14 - description: 'Support any legacy format: 7 to 1 for v0.7+ to v0.1+') 13 + option('legacy_level', type: 'integer', min: 0, max: 7, value: 0, 14 + description: 'Support legacy format: 0=disabled, 1-7=support v0.1+ to v0.7+') 15 15 option('debug_level', type: 'integer', min: 0, max: 9, value: 1, 16 16 description: 'Enable run-time debug. See lib/common/debug.h') 17 17 option('backtrace', type: 'feature', value: 'disabled',
+1 -1
vendor/git/zstd-c/lib/BUCK
··· 57 57 srcs=glob(['legacy/*.c']), 58 58 deps=[':common'], 59 59 exported_preprocessor_flags=[ 60 - '-DZSTD_LEGACY_SUPPORT=4', 60 + '-DZSTD_LEGACY_SUPPORT=0', 61 61 ], 62 62 ) 63 63
+4 -3
vendor/git/zstd-c/lib/README.md
··· 12 12 - `make` : generates both static and dynamic libraries 13 13 - `make install` : install libraries, headers and pkg-config in local system directories 14 14 15 - `libzstd` default scope is extensive, including compression, decompression, dictionary builder, 16 - and support for decoding legacy formats >= v0.5.0 by default. 15 + `libzstd` default scope includes compression, decompression, and dictionary builder. 16 + Note: starting v1.6.0, support for decoding legacy formats is disabled by default. 17 + See _modular build_ below to learn how to enable it. 17 18 The scope can be reduced on demand (see paragraph _modular build_). 18 19 19 20 #### Multiarch Support ··· 99 100 Specifying a number limits versions supported to that version onward. 100 101 For example, `ZSTD_LEGACY_SUPPORT=2` means : "support legacy formats >= v0.2.0". 101 102 Conversely, `ZSTD_LEGACY_SUPPORT=0` means "do __not__ support legacy formats". 102 - By default, this build macro is set as `ZSTD_LEGACY_SUPPORT=5`. 103 + By default, this build macro is set as `ZSTD_LEGACY_SUPPORT=0` (disabled). 103 104 Decoding supported legacy format is a transparent capability triggered within decompression functions. 104 105 It's also allowed to invoke legacy API directly, exposed in `lib/legacy/zstd_legacy.h`. 105 106 Each version does also provide its own set of advanced API.
+2 -6
vendor/git/zstd-c/lib/libzstd.mk
··· 28 28 # configures a bunch of other variables to space-optimized defaults. 29 29 ZSTD_LIB_MINIFY ?= 0 30 30 31 - # Legacy support 32 - ifneq ($(ZSTD_LIB_MINIFY), 0) 33 - ZSTD_LEGACY_SUPPORT ?= 0 34 - else 35 - ZSTD_LEGACY_SUPPORT ?= 5 36 - endif 31 + # Legacy support disabled by default 32 + ZSTD_LEGACY_SUPPORT ?= 0 37 33 ZSTD_LEGACY_MULTITHREADED_API ?= 0 38 34 39 35 # Build size optimizations
+2 -2
vendor/git/zstd-c/lib/zstd.h
··· 110 110 111 111 /*------ Version ------*/ 112 112 #define ZSTD_VERSION_MAJOR 1 113 - #define ZSTD_VERSION_MINOR 5 114 - #define ZSTD_VERSION_RELEASE 8 113 + #define ZSTD_VERSION_MINOR 6 114 + #define ZSTD_VERSION_RELEASE 0 115 115 #define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE) 116 116 117 117 /*! ZSTD_versionNumber() :
+1 -1
vendor/git/zstd-c/tests/Makefile
··· 20 20 # zstreamtest32: Same as zstreamtest, but forced to compile in 32-bits mode 21 21 # ########################################################################## 22 22 23 - ZSTD_LEGACY_SUPPORT ?= 5 23 + ZSTD_LEGACY_SUPPORT ?= 0 24 24 export ZSTD_LEGACY_SUPPORT 25 25 26 26 DEBUGLEVEL ?= 2
+17 -6
vendor/git/zstd-c/tests/libzstd_builds.sh
··· 21 21 $ECHO "$@ correctly not present" # for some reason, this $ECHO must exist, otherwise mustBeAbsent() always fails (??) 22 22 } 23 23 24 - # default compilation : all features enabled - no zbuff 24 + # default compilation : all features enabled - no zbuff, no legacy 25 25 $ECHO "testing default library compilation" 26 26 CFLAGS= make -C $DIR/../lib libzstd libzstd.a > $INTOVOID 27 27 nm $DIR/../lib/libzstd.a | $GREP "\.o" > tmplog 28 28 isPresent "zstd_compress.o" 29 29 isPresent "zstd_decompress.o" 30 30 isPresent "zdict.o" 31 - isPresent "zstd_v07.o" 31 + mustBeAbsent "zstd_v07.o" 32 32 mustBeAbsent "zbuff_compress.o" 33 33 $RM tmplog 34 34 ··· 44 44 mustBeAbsent "zstd_compress.o" 45 45 isPresent "zstd_decompress.o" 46 46 mustBeAbsent "zdict.o" 47 - isPresent "zstd_v07.o" 47 + mustBeAbsent "zstd_v07.o" 48 48 mustBeAbsent "zbuff_compress.o" 49 49 $RM $DIR/../lib/libzstd.a tmplog 50 50 ··· 66 66 isPresent "zstd_compress.o" 67 67 isPresent "zstd_decompress.o" 68 68 isPresent "zdict.o" 69 - isPresent "zstd_v07.o" 69 + mustBeAbsent "zstd_v07.o" 70 70 mustBeAbsent "zbuff_compress.o" 71 71 $RM $DIR/../lib/libzstd.a tmplog 72 72 ··· 77 77 isPresent "zstd_compress.o" 78 78 isPresent "zstd_decompress.o" 79 79 isPresent "zdict.o" 80 - isPresent "zstd_v07.o" 80 + mustBeAbsent "zstd_v07.o" 81 81 isPresent "zbuff_compress.o" 82 82 $RM $DIR/../lib/libzstd.a tmplog 83 83 ··· 88 88 isPresent "zstd_compress.o" 89 89 isPresent "zstd_decompress.o" 90 90 mustBeAbsent "zdict.o" 91 - isPresent "zstd_v07.o" 91 + mustBeAbsent "zstd_v07.o" 92 92 mustBeAbsent "zbuff_compress.o" 93 93 $RM $DIR/../lib/libzstd.a tmplog 94 94 ··· 102 102 mustBeAbsent "zstd_v07.o" 103 103 mustBeAbsent "zbuff_compress.o" 104 104 $RM $DIR/../lib/libzstd.a tmplog 105 + 106 + # legacy support explicitly enabled 107 + $ECHO "testing with legacy support explicitly enabled" 108 + ZSTD_LEGACY_SUPPORT=5 CFLAGS= make -C $DIR/../lib libzstd.a > $INTOVOID 109 + nm $DIR/../lib/libzstd.a | $GREP "\.o" > tmplog 110 + isPresent "zstd_compress.o" 111 + isPresent "zstd_decompress.o" 112 + isPresent "zdict.o" 113 + isPresent "zstd_v07.o" 114 + mustBeAbsent "zbuff_compress.o" 115 + $RM $DIR/../lib/libzstd.a tmplog
+12 -2
vendor/git/zstd-c/tests/test-zstd-versions.py
··· 259 259 shutil.copy2('dictBuilder', '{}/dictBuilder.{}'.format(tmp_dir, tag)) 260 260 os.chdir(r_dir + '/programs') # /path/to/zstd/tests/versionsTest/<TAG>/programs 261 261 make(['clean'], False) # separate 'clean' target to allow parallel build 262 - make(['zstd'], False) 262 + # Enable legacy support for cross-version compatibility testing. 263 + # Use ZSTD_LEGACY_SUPPORT=1 for v0.6.x due to a bug where headers 264 + # check for ==1 but code checks for >=1. 265 + # Use ZSTD_LEGACY_SUPPORT=5 for v1.2.0+ because =1 includes old 266 + # legacy files (v01-v04) that have missing includes in newer versions. 267 + if tag < 'v1.2.0': 268 + make(['zstd', 'ZSTD_LEGACY_SUPPORT=1'], False) 269 + else: 270 + make(['zstd', 'ZSTD_LEGACY_SUPPORT=5'], False) 263 271 else: 264 272 os.chdir(programs_dir) 265 273 print('-----------------------------------------------') 266 274 print('compiling head') 267 275 print('-----------------------------------------------') 268 - make(['zstd'], False) 276 + # Enable legacy support for head to test cross-version compatibility 277 + # (legacy support is disabled by default since v1.6.0) 278 + make(['zstd', 'ZSTD_LEGACY_SUPPORT=5'], False) 269 279 shutil.copy2('zstd', dst_zstd) 270 280 271 281 # remove any remaining *.zst and *.dec from previous test