Only define ZSTDLIB_API when building a Windows DLL

This commit is contained in:
Christophe Chevalier 2015-12-09 15:48:22 +01:00
parent 844baf4fc5
commit 7b05324a71
2 changed files with 6 additions and 14 deletions

View File

@ -48,14 +48,10 @@ extern "C" {
*****************************************************************/
/*!
* ZSTD_DLL_EXPORT :
* Enable exporting of functions when building a DLL
* Enable exporting of functions when building a Windows DLL
*/
#if defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
# if _WIN32
# define ZSTDLIB_API __declspec(dllexport)
# else
# define ZSTDLIB_API extern
# endif
#if defined(_WIN32) && defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
# define ZSTDLIB_API __declspec(dllexport)
#else
# define ZSTDLIB_API
#endif

View File

@ -52,14 +52,10 @@ extern "C" {
*****************************************************************/
/*!
* ZSTD_DLL_EXPORT :
* Enable exporting of functions when building a DLL
* Enable exporting of functions when building a Windows DLL
*/
#if defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
# if _WIN32
# define ZSTDLIB_API __declspec(dllexport)
# else
# define ZSTDLIB_API extern
# endif
#if defined(_WIN32) && defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
# define ZSTDLIB_API __declspec(dllexport)
#else
# define ZSTDLIB_API
#endif