Signed-off-by: Norbert Lange <[email protected]>
---
.../libarchive/zstd/common/error_private.h | 2 +-
archival/libarchive/zstd/common/fse.h | 13 +---------
archival/libarchive/zstd/common/huf.h | 14 +---------
archival/libarchive/zstd/common/xxhash.h | 26 +------------------
.../libarchive/zstd/common/zstd_internal.h | 4 +--
.../libarchive/zstd/decompress/zstd_ddict.h | 2 +-
.../zstd/decompress/zstd_decompress_block.c | 2 +-
7 files changed, 8 insertions(+), 55 deletions(-)
diff --git a/archival/libarchive/zstd/common/error_private.h
b/archival/libarchive/zstd/common/error_private.h
index 313b32a10..f338521a9 100644
--- a/archival/libarchive/zstd/common/error_private.h
+++ b/archival/libarchive/zstd/common/error_private.h
@@ -63,7 +63,7 @@ ERR_STATIC ERR_enum ERR_getErrorCode(size_t code) { if
(!ERR_isError(code)) retu
* Error Strings
******************************************/
-const char* ERR_getErrorString(ERR_enum code); /* error_private.c */
+ERR_STATIC const char* ERR_getErrorString(ERR_enum code); /* error_private.c
*/
ERR_STATIC const char* ERR_getErrorName(size_t code)
{
diff --git a/archival/libarchive/zstd/common/fse.h
b/archival/libarchive/zstd/common/fse.h
index fa9c6251f..28dce6c73 100644
--- a/archival/libarchive/zstd/common/fse.h
+++ b/archival/libarchive/zstd/common/fse.h
@@ -23,18 +23,7 @@
#include "zstd_deps.h" /* size_t, ptrdiff_t */
-/*-*****************************************
-* FSE_PUBLIC_API : control library symbols visibility
-******************************************/
-#if defined(FSE_DLL_EXPORT) && (FSE_DLL_EXPORT==1) && defined(__GNUC__) &&
(__GNUC__ >= 4)
-# define FSE_PUBLIC_API __attribute__ ((visibility ("default")))
-#elif defined(FSE_DLL_EXPORT) && (FSE_DLL_EXPORT==1) /* Visual expected */
-# define FSE_PUBLIC_API __declspec(dllexport)
-#elif defined(FSE_DLL_IMPORT) && (FSE_DLL_IMPORT==1)
-# define FSE_PUBLIC_API __declspec(dllimport) /* It isn't required but allows
to generate better code, saving a function pointer load from the IAT and an
indirect jump.*/
-#else
-# define FSE_PUBLIC_API
-#endif
+# define FSE_PUBLIC_API MEM_STATIC
/*------ Version ------*/
#define FSE_VERSION_MAJOR 0
diff --git a/archival/libarchive/zstd/common/huf.h
b/archival/libarchive/zstd/common/huf.h
index 14e78edb8..a30fae527 100644
--- a/archival/libarchive/zstd/common/huf.h
+++ b/archival/libarchive/zstd/common/huf.h
@@ -20,19 +20,7 @@
#include "zstd_deps.h" /* size_t */
-/* *** library symbols visibility *** */
-/* Note : when linking with -fvisibility=hidden on gcc, or by default on
Visual,
- * HUF symbols remain "private" (internal symbols for library only).
- * Set macro FSE_DLL_EXPORT to 1 if you want HUF symbols visible on DLL
interface */
-#if defined(FSE_DLL_EXPORT) && (FSE_DLL_EXPORT==1) && defined(__GNUC__) &&
(__GNUC__ >= 4)
-# define HUF_PUBLIC_API __attribute__ ((visibility ("default")))
-#elif defined(FSE_DLL_EXPORT) && (FSE_DLL_EXPORT==1) /* Visual expected */
-# define HUF_PUBLIC_API __declspec(dllexport)
-#elif defined(FSE_DLL_IMPORT) && (FSE_DLL_IMPORT==1)
-# define HUF_PUBLIC_API __declspec(dllimport) /* not required, just to
generate faster code (saves a function pointer load from IAT and an indirect
jump) */
-#else
-# define HUF_PUBLIC_API
-#endif
+# define HUF_PUBLIC_API MEM_STATIC
/* ========================== */
diff --git a/archival/libarchive/zstd/common/xxhash.h
b/archival/libarchive/zstd/common/xxhash.h
index 8865cfd81..184cc26e9 100644
--- a/archival/libarchive/zstd/common/xxhash.h
+++ b/archival/libarchive/zstd/common/xxhash.h
@@ -56,31 +56,7 @@ XXH32 6.8 GB/s 6.0 GB/s
typedef enum { XXH_OK=0, XXH_ERROR } XXH_errorcode;
-/* ****************************
-* API modifier
-******************************/
-/** XXH_PRIVATE_API
-* This is useful if you want to include xxhash functions in `static` mode
-* in order to inline them, and remove their symbol from the public list.
-* Methodology :
-* #define XXH_PRIVATE_API
-* #include "xxhash.h"
-* `xxhash.c` is automatically included.
-* It's not useful to compile and link it as a separate module anymore.
-*/
-#ifdef XXH_PRIVATE_API
-# if defined(__GNUC__)
-# define XXH_PUBLIC_API static __inline __attribute__((unused))
-# elif (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
-# define XXH_PUBLIC_API static inline
-# elif defined(_MSC_VER)
-# define XXH_PUBLIC_API static __inline
-# else
-# define XXH_PUBLIC_API static /* this version may generate warnings for
unused static functions; disable the relevant warning */
-# endif
-#else
-# define XXH_PUBLIC_API /* do nothing */
-#endif /* XXH_PRIVATE_API */
+# define XXH_PUBLIC_API MEM_STATIC
/*!XXH_NAMESPACE, aka Namespace Emulation :
diff --git a/archival/libarchive/zstd/common/zstd_internal.h
b/archival/libarchive/zstd/common/zstd_internal.h
index 65e1b9fe3..accda8834 100644
--- a/archival/libarchive/zstd/common/zstd_internal.h
+++ b/archival/libarchive/zstd/common/zstd_internal.h
@@ -268,7 +268,7 @@ typedef enum {
* The src buffer must be before the dst buffer.
*/
MEM_STATIC FORCE_INLINE_ATTR
-static void ZSTD_wildcopy(void* dst, const void* src, ptrdiff_t length,
ZSTD_overlap_e const ovtype)
+void ZSTD_wildcopy(void* dst, const void* src, ptrdiff_t length,
ZSTD_overlap_e const ovtype)
{
ptrdiff_t diff = (BYTE*)dst - (const BYTE*)src;
const BYTE* ip = (const BYTE*)src;
@@ -406,7 +406,7 @@ typedef struct {
unsigned long long decompressedBound;
} ZSTD_frameSizeInfo; /* decompress & legacy */
-const seqStore_t* ZSTD_getSeqStore(const ZSTD_CCtx* ctx); /* compress &
dictBuilder */
+static const seqStore_t* ZSTD_getSeqStore(const ZSTD_CCtx* ctx); /* compress
& dictBuilder */
static void ZSTD_seqToCodes(const seqStore_t* seqStorePtr); /* compress,
dictBuilder, decodeCorpus (shouldn't get its definition from here) */
/* custom memory allocation functions */
diff --git a/archival/libarchive/zstd/decompress/zstd_ddict.h
b/archival/libarchive/zstd/decompress/zstd_ddict.h
index b79a40944..3d5c93e51 100644
--- a/archival/libarchive/zstd/decompress/zstd_ddict.h
+++ b/archival/libarchive/zstd/decompress/zstd_ddict.h
@@ -34,7 +34,7 @@
* ZSTD_getDictID_fromDict()
*/
-const void* ZSTD_DDict_dictContent(const ZSTD_DDict* ddict);
+static const void* ZSTD_DDict_dictContent(const ZSTD_DDict* ddict);
static size_t ZSTD_DDict_dictSize(const ZSTD_DDict* ddict);
static void ZSTD_copyDDictParameters(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict);
diff --git a/archival/libarchive/zstd/decompress/zstd_decompress_block.c
b/archival/libarchive/zstd/decompress/zstd_decompress_block.c
index cd726cc76..58eabb9fa 100644
--- a/archival/libarchive/zstd/decompress/zstd_decompress_block.c
+++ b/archival/libarchive/zstd/decompress/zstd_decompress_block.c
@@ -71,7 +71,7 @@ size_t ZSTD_getcBlockSize(const void* src, size_t srcSize,
/* Hidden declaration for fullbench */
-size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx,
+static size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx,
const void* src, size_t srcSize);
/*! ZSTD_decodeLiteralsBlock() :
* @return : nb of bytes read from src (< srcSize )
--
2.33.0
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox