]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Only define ZSTDLIB_API when building a Windows DLL
authorChristophe Chevalier <chevalier@doxense.com>
Wed, 9 Dec 2015 14:48:22 +0000 (15:48 +0100)
committerChristophe Chevalier <chevalier@doxense.com>
Wed, 9 Dec 2015 16:12:12 +0000 (17:12 +0100)
lib/zstd.h
lib/zstd_buffered.h

index 0795cbb08979b83ef5e9dde5873e796b6f07f048..b0c841f3a9a1fa6c4fab45d570ee389f7a5c88c3 100644 (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
index fffa70a0555953620a0042885724f1f213590904..755728b1b363709e8edfc368f850f1672f213ad7 100644 (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