mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
thirdparty: upgrade zstd to 1.5.8 (#24597)
This commit is contained in:
parent
52c7130a2f
commit
af8ecdaa26
4 changed files with 6096 additions and 4697 deletions
28
thirdparty/zstd/fix.md
vendored
Normal file
28
thirdparty/zstd/fix.md
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
1. replace all `abs64` with `zstd_abs64`.
|
||||
|
||||
2. add following at header of the file:
|
||||
#if defined(__TINYC__)
|
||||
#if defined(_WIN32)
|
||||
#undef ZSTD_MULTITHREAD
|
||||
#define ZSTD_NO_INTRINSICS
|
||||
#endif
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
#define NO_PREFETCH
|
||||
#endif
|
||||
#endif
|
||||
|
||||
3. replace `qsort_r` with `qsort`, as there is no way detect __MUSL__ macro. add following at header of the file:
|
||||
#ifndef ZDICT_QSORT
|
||||
# if defined(__APPLE__)
|
||||
# define ZDICT_QSORT ZDICT_QSORT_APPLE /* uses qsort_r() with a different order for parameters */
|
||||
# elif defined(__GLIBC__)
|
||||
# define ZDICT_QSORT ZDICT_QSORT_GNU /* uses qsort_r() */
|
||||
# elif defined(_WIN32) && defined(_MSC_VER)
|
||||
# define ZDICT_QSORT ZDICT_QSORT_MSVC /* uses qsort_s() with a different order for parameters */
|
||||
# elif defined(STDC_LIB_EXT1) && (STDC_LIB_EXT1 > 0) /* C11 Annex K */
|
||||
# define ZDICT_QSORT ZDICT_QSORT_C11 /* uses qsort_s() */
|
||||
# else
|
||||
# define ZDICT_QSORT ZDICT_QSORT_C90 /* uses standard qsort() which is not re-entrant (requires global variable) */
|
||||
# endif
|
||||
#endif
|
||||
|
7631
thirdparty/zstd/zstd.c
vendored
7631
thirdparty/zstd/zstd.c
vendored
File diff suppressed because it is too large
Load diff
3090
thirdparty/zstd/zstd.h
vendored
3090
thirdparty/zstd/zstd.h
vendored
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue