1
0
mirror of https://github.com/facebook/zstd.git synced 2025-12-01 23:57:51 +03:00

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 : * 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 defined(_WIN32) && defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
# if _WIN32
# define ZSTDLIB_API __declspec(dllexport) # define ZSTDLIB_API __declspec(dllexport)
# else
# define ZSTDLIB_API extern
# endif
#else #else
# define ZSTDLIB_API # define ZSTDLIB_API
#endif #endif

View File

@@ -52,14 +52,10 @@ extern "C" {
*****************************************************************/ *****************************************************************/
/*! /*!
* ZSTD_DLL_EXPORT : * 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 defined(_WIN32) && defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
# if _WIN32
# define ZSTDLIB_API __declspec(dllexport) # define ZSTDLIB_API __declspec(dllexport)
# else
# define ZSTDLIB_API extern
# endif
#else #else
# define ZSTDLIB_API # define ZSTDLIB_API
#endif #endif