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.

test: fix versionsTest build for old zstd versions

Summary:
Some old zstd versions (notably v0.6.x) have a bug in fileio.c where header includes check for `ZSTD_LEGACY_SUPPORT==1` but code usage checks for `ZSTD_LEGACY_SUPPORT>=1`. Using value 5 causes compilation failure because headers aren't included but the code tries to use legacy functions.

Changing to `ZSTD_LEGACY_SUPPORT=1` for old version builds fixes the compilation while still enabling legacy format support.

Test Plan:
Run `make versionsTest` or `python3 tests/test-zstd-versions.py` to verify all old versions compile and cross-version decompression works correctly.

authored by

Yann Collet and committed by
Yann Collet
6945ffa0 432476ab

+9 -2
+9 -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 - # Enable legacy support for cross-version compatibility testing 263 - make(['zstd', 'ZSTD_LEGACY_SUPPORT=5'], 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) 264 271 else: 265 272 os.chdir(programs_dir) 266 273 print('-----------------------------------------------')