[contrib][linux] Add wrapper API
Add the kernel wrapper API. This keeps the same API and semantics as the existing kernel API with name changes to be more kernel style and avoid symbol collisions with zstd.
This commit is contained in:
1 parent
6112b82526
commit
f58e9a9830
8 files changed
+769
-177
No files matched your search
@@ -22,8 +22,6 @@ libzstd:
|
||||
--xxh64-prefix 'xxh64' \
|
||||
--rewrite-include '<limits\.h>=<linux/limits.h>' \
|
||||
--rewrite-include '<stddef\.h>=<linux/types.h>' \
|
||||
--rewrite-include '"\.\./zstd.h"=<linux/zstd.h>' \
|
||||
--rewrite-include '"(\.\./common/)?zstd_errors.h"=<linux/zstd_errors.h>' \
|
||||
-DZSTD_NO_INTRINSICS \
|
||||
-DZSTD_NO_UNUSED_FUNCTIONS \
|
||||
-DZSTD_LEGACY_SUPPORT=0 \
|
||||
@@ -48,8 +46,7 @@ libzstd:
|
||||
-U_WIN32 \
|
||||
-RZSTDLIB_VISIBILITY= \
|
||||
-RZSTDERRORLIB_VISIBILITY=
|
||||
mv linux/lib/zstd/zstd.h linux/include/linux
|
||||
mv linux/lib/zstd/common/zstd_errors.h linux/include/linux
|
||||
cp linux_zstd.h linux/include/linux/zstd.h
|
||||
cp zstd_compress_module.c linux/lib/zstd
|
||||
cp zstd_decompress_module.c linux/lib/zstd
|
||||
cp decompress_sources.h linux/lib/zstd
|
||||
@@ -62,9 +59,8 @@ import: libzstd
|
||||
rm -f $(LINUX)/include/linux/zstd.h
|
||||
rm -f $(LINUX)/include/linux/zstd_errors.h
|
||||
rm -rf $(LINUX)/lib/zstd
|
||||
mv linux/include/linux/zstd.h $(LINUX)/include/linux
|
||||
mv linux/include/linux/zstd_errors.h $(LINUX)/include/linux
|
||||
mv linux/lib/zstd $(LINUX)/lib
|
||||
cp linux/include/linux/zstd.h $(LINUX)/include/linux
|
||||
cp -r linux/lib/zstd $(LINUX)/lib
|
||||
|
||||
.PHONY: test
|
||||
test: libzstd
|
||||
|
||||
Reference in new issue
Block a user