mirror of
https://github.com/facebook/zstd.git
synced 2025-10-08 00:04:02 -04:00
Revert "Partial compilation test?"
This reverts commit b2496ab60663992eb566dd221705da86fc9dafc7.
This commit is contained in:
parent
b2496ab606
commit
11d5bfdaa9
28
lib/log
28
lib/log
@ -1,28 +0,0 @@
|
||||
entropy_common.o:
|
||||
error_private.o:
|
||||
fse_decompress.o:
|
||||
pool.o:
|
||||
threading.o:
|
||||
xxhash.o:
|
||||
zstd_common.o:
|
||||
fse_compress.o:
|
||||
huf_compress.o:
|
||||
zstd_compress.o:
|
||||
zstd_double_fast.o:
|
||||
zstd_fast.o:
|
||||
zstd_lazy.o:
|
||||
zstd_ldm.o:
|
||||
zstd_opt.o:
|
||||
zstdmt_compress.o:
|
||||
huf_decompress.o:
|
||||
zstd_decompress.o:
|
||||
zbuff_common.o:
|
||||
zbuff_compress.o:
|
||||
zbuff_decompress.o:
|
||||
cover.o:
|
||||
divsufsort.o:
|
||||
zdict.o:
|
||||
zstd_v04.o:
|
||||
zstd_v05.o:
|
||||
zstd_v06.o:
|
||||
zstd_v07.o:
|
@ -233,14 +233,6 @@ else
|
||||
$(CC) $(FLAGS) $< -o $@$(EXT) -Wl,-rpath=$(ZSTDDIR) $(ZSTDDIR)/libzstd.so # broken on Mac
|
||||
endif
|
||||
|
||||
partial : partial.c zstd-dll
|
||||
ifneq (,$(filter Windows%,$(OS)))
|
||||
cp $(ZSTDDIR)/dll/libzstd.dll .
|
||||
$(CC) $(FLAGS) $< -o $@$(EXT) -DZSTD_DLL_IMPORT=1 libzstd.dll
|
||||
else
|
||||
$(CC) $(FLAGS) $< -o $@$(EXT) -Wl,-rpath=$(ZSTDDIR) $(ZSTDDIR)/libzstd.so # broken on Mac
|
||||
endif
|
||||
|
||||
poolTests : poolTests.c $(ZSTDDIR)/common/pool.c $(ZSTDDIR)/common/threading.c $(ZSTDDIR)/common/zstd_common.c $(ZSTDDIR)/common/error_private.c
|
||||
$(CC) $(FLAGS) $(MULTITHREAD) $^ -o $@$(EXT)
|
||||
|
||||
@ -263,7 +255,7 @@ clean:
|
||||
zstreamtest$(EXT) zstreamtest32$(EXT) \
|
||||
datagen$(EXT) paramgrill$(EXT) roundTripCrash$(EXT) longmatch$(EXT) \
|
||||
symbols$(EXT) invalidDictionaries$(EXT) legacy$(EXT) poolTests$(EXT) \
|
||||
decodecorpus$(EXT) checkTag$(EXT) partial$(EXT)
|
||||
decodecorpus$(EXT) checkTag$(EXT)
|
||||
@echo Cleaning completed
|
||||
|
||||
|
||||
@ -395,9 +387,6 @@ test-invalidDictionaries: invalidDictionaries
|
||||
test-symbols: symbols
|
||||
$(QEMU_SYS) ./symbols
|
||||
|
||||
test-partial: partial
|
||||
$(QEMU_SYS) ./partial
|
||||
|
||||
test-legacy: legacy
|
||||
$(QEMU_SYS) ./legacy
|
||||
|
||||
|
BIN
tests/partial
BIN
tests/partial
Binary file not shown.
100
tests/partial.c
100
tests/partial.c
@ -1,100 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under both the BSD-style license (found in the
|
||||
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
||||
* in the COPYING file in the root directory of this source tree).
|
||||
* You may select, at your option, one of the above-listed licenses.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include "zstd_errors.h"
|
||||
//#define ZSTD_STATIC_LINKING_ONLY
|
||||
#include "zstd.h"
|
||||
#define ZBUFF_DISABLE_DEPRECATE_WARNINGS
|
||||
#define ZBUFF_STATIC_LINKING_ONLY
|
||||
#include "zbuff.h"
|
||||
#define ZDICT_DISABLE_DEPRECATE_WARNINGS
|
||||
#define ZDICT_STATIC_LINKING_ONLY
|
||||
#include "zdict.h"
|
||||
|
||||
/*
|
||||
size_t ZSTD_compress(void* dst, size_t dstCapacity, const void* src, size_t srcSize, int compressionLevel) __attribute__((weak)); //compress
|
||||
size_t ZSTD_decompress( void* dst, size_t dstCapacity, const void* src, size_t compressedSize) __attribute__((weak)); //decompress
|
||||
int weakfunc() __attribute__((weak)); //deprecated
|
||||
int weakfunc() __attribute__((weak)); //dictbuilder
|
||||
int weakfunc() __attribute__((weak)); //legacy
|
||||
*/
|
||||
//size_t ZSTD_compress(void* dst, size_t dstCapacity, const void* src, size_t srcSize, int compressionLevel) __attribute__((weak)); //compress
|
||||
//size_t ZSTD_decompress( void* dst, size_t dstCapacity, const void* src, size_t compressedSize) __attribute__((weak)); //decompress
|
||||
unsigned ZBUFF_isError(size_t errorCode) __attribute__((weak)); //deprecated
|
||||
unsigned ZDICT_isError(size_t errorCode) __attribute__((weak));
|
||||
unsigned ZBUFFv07_isError(size_t errorCode) __attribute__((weak));
|
||||
unsigned ZBUFFv06_isError(size_t errorCode) __attribute__((weak));
|
||||
unsigned ZBUFFv05_isError(size_t errorCode) __attribute__((weak));
|
||||
unsigned ZBUFFv04_isError(size_t errorCode) __attribute__((weak));
|
||||
unsigned ZBUFFv03_isError(size_t errorCode) __attribute__((weak));
|
||||
unsigned ZBUFFv02_isError(size_t errorCode) __attribute__((weak));
|
||||
unsigned ZBUFFv01_isError(size_t errorCode) __attribute__((weak));
|
||||
|
||||
int checkCompress(void) {
|
||||
if(ZSTD_compress) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int checkDecompress(void) {
|
||||
if(ZSTD_decompress) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int checkDeprecated(void) {
|
||||
if(ZBUFF_isError) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int checkDictBuilder(void) {
|
||||
if(ZDICT_isError) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int checkLegacy(void) {
|
||||
if(ZBUFFv01_isError) {
|
||||
return 1;
|
||||
} else if (ZBUFFv02_isError) {
|
||||
return 2;
|
||||
} else if (ZBUFFv03_isError) {
|
||||
return 3;
|
||||
} else if (ZBUFFv04_isError) {
|
||||
return 4;
|
||||
} else if (ZBUFFv05_isError) {
|
||||
return 5;
|
||||
} else if (ZBUFFv06_isError) {
|
||||
return 6;
|
||||
} else if (ZBUFFv07_isError) {
|
||||
return 7;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(void){//int argc, const char** argv) {
|
||||
//const void **symbol;
|
||||
//(void)argc;
|
||||
//(void)argv;
|
||||
|
||||
printf("%d %d %d %d %d\n", checkCompress(), checkDecompress(), checkDeprecated(), checkDictBuilder(), checkLegacy());
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user