diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile | 2 | ||||
-rw-r--r-- | lib/lz4.h | 5 | ||||
-rw-r--r-- | lib/lz4frame.h | 10 | ||||
-rw-r--r-- | lib/lz4hc.h | 10 |
4 files changed, 13 insertions, 14 deletions
diff --git a/lib/Makefile b/lib/Makefile index e3f1c7a..3d251dc 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -44,7 +44,7 @@ BUILD_STATIC:= yes DESTDIR?= PREFIX ?= /usr/local -CPPFLAGS= -DXXH_NAMESPACE=LZ4_ -DLZ4_DLL_EXPORT=1 +CPPFLAGS= -DXXH_NAMESPACE=LZ4_ CFLAGS ?= -O3 CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \ -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef \ @@ -55,12 +55,15 @@ extern "C" { * LZ4_DLL_EXPORT : * Enable exporting of functions when building a Windows DLL */ -#if defined(_WIN32) && defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) +#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) # define LZ4LIB_API __declspec(dllexport) +#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) +# define LZ4LIB_API __declspec(dllimport) #else # define LZ4LIB_API #endif + /*-************************************ * Version **************************************/ diff --git a/lib/lz4frame.h b/lib/lz4frame.h index 43bc23c..8fc5d17 100644 --- a/lib/lz4frame.h +++ b/lib/lz4frame.h @@ -55,12 +55,10 @@ extern "C" { * LZ4_DLL_EXPORT : * Enable exporting of functions when building a Windows DLL */ -#if defined(_WIN32) -# if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) -# define LZ4FLIB_API __declspec(dllexport) -# else -# define LZ4FLIB_API __declspec(dllimport) -# endif +#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) +# define LZ4FLIB_API __declspec(dllexport) +#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) +# define LZ4FLIB_API __declspec(dllimport) #else # define LZ4FLIB_API #endif diff --git a/lib/lz4hc.h b/lib/lz4hc.h index 4f676aa..563ad98 100644 --- a/lib/lz4hc.h +++ b/lib/lz4hc.h @@ -51,12 +51,10 @@ extern "C" { * LZ4_DLL_EXPORT : * Enable exporting of functions when building a Windows DLL */ -#if defined(_WIN32) -# if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) -# define LZ4HCLIB_API __declspec(dllexport) -# else -# define LZ4HCLIB_API __declspec(dllimport) -# endif +#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) +# define LZ4HCLIB_API __declspec(dllexport) +#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) +# define LZ4HCLIB_API __declspec(dllimport) #else # define LZ4HCLIB_API #endif |