mirror of
https://github.com/facebook/zstd.git
synced 2025-12-11 00:06:10 -05:00
introduced ZSTDLIB_VISIBILITY
This commit is contained in:
parent
dc9931205a
commit
60f10aab6c
@ -8,7 +8,7 @@ matrix:
|
|||||||
|
|
||||||
|
|
||||||
# Container-based Ubuntu 12.04 LTS Server Edition 64 bit (doesn't support 32-bit includes)
|
# Container-based Ubuntu 12.04 LTS Server Edition 64 bit (doesn't support 32-bit includes)
|
||||||
- env: Ubu=12.04cont Cmd="make test && make clean && make travis-install"
|
- env: Ubu=12.04cont Cmd="make test && make clean && make travis-install && make -C tests fullbench-dll fullbench-lib"
|
||||||
os: linux
|
os: linux
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
|
|||||||
16
lib/zstd.h
16
lib/zstd.h
@ -18,15 +18,19 @@ extern "C" {
|
|||||||
#include <stddef.h> /* size_t */
|
#include <stddef.h> /* size_t */
|
||||||
|
|
||||||
|
|
||||||
|
/* ===== ZSTDLIB_API : control library symbols visibility ===== */
|
||||||
/* ===== ZSTDLIB_API : control library symbols visibility ===== */
|
/* ===== ZSTDLIB_API : control library symbols visibility ===== */
|
||||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||||
# define ZSTDLIB_API __attribute__ ((visibility ("default")))
|
# define ZSTDLIB_VISIBILITY __attribute__ ((visibility ("default")))
|
||||||
#elif defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
|
|
||||||
# define ZSTDLIB_API __declspec(dllexport)
|
|
||||||
#elif defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)
|
|
||||||
# define ZSTDLIB_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
|
#else
|
||||||
# define ZSTDLIB_API
|
# define ZSTDLIB_VISIBILITY
|
||||||
|
#endif
|
||||||
|
#if defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
|
||||||
|
# define ZSTDLIB_API __declspec(dllexport) ZSTDLIB_VISIBILITY
|
||||||
|
#elif defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)
|
||||||
|
# define ZSTDLIB_API __declspec(dllimport) ZSTDLIB_VISIBILITY /* It isn't required but allows to generate better code, saving a function pointer load from the IAT and an indirect jump.*/
|
||||||
|
#else
|
||||||
|
# define ZSTDLIB_API ZSTDLIB_VISIBILITY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user