diff options
author | Przemyslaw Skibinski <inikep@gmail.com> | 2016-11-09 11:52:27 (GMT) |
---|---|---|
committer | Przemyslaw Skibinski <inikep@gmail.com> | 2016-11-09 11:52:27 (GMT) |
commit | 7df658ec1b9976e40d3c6abdf70da4560b2edd38 (patch) | |
tree | 49b6c70de7d1fcad1c71f0f5d61b6ce8b212c5fb | |
parent | 4a6e7327c7be56abdd3c5a32d8a69213f46956d3 (diff) | |
download | lz4-7df658ec1b9976e40d3c6abdf70da4560b2edd38.zip lz4-7df658ec1b9976e40d3c6abdf70da4560b2edd38.tar.gz lz4-7df658ec1b9976e40d3c6abdf70da4560b2edd38.tar.bz2 |
removed LZ4_DLL_EXPORT=1 (2)
-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 | ||||
-rw-r--r-- | programs/Makefile | 2 | ||||
-rw-r--r-- | tests/Makefile | 2 | ||||
-rw-r--r-- | visual/VS2010/lz4/lz4.vcxproj | 8 |
7 files changed, 19 insertions, 20 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 diff --git a/programs/Makefile b/programs/Makefile index 39672b3..5c2bdcd 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -37,7 +37,7 @@ LZ4DIR := ../lib CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wpointer-arith CFLAGS += $(MOREFLAGS) -CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ -DLZ4_DLL_EXPORT=1 +CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) diff --git a/tests/Makefile b/tests/Makefile index 9415f7b..d5f9133 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -44,7 +44,7 @@ PYTHON?= python3 CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes CFLAGS += $(MOREFLAGS) -CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ -DLZ4_DLL_EXPORT=1 +CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) diff --git a/visual/VS2010/lz4/lz4.vcxproj b/visual/VS2010/lz4/lz4.vcxproj index a3d8368..a17cdd5 100644 --- a/visual/VS2010/lz4/lz4.vcxproj +++ b/visual/VS2010/lz4/lz4.vcxproj @@ -88,7 +88,7 @@ </PrecompiledHeader> <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> <EnablePREfast>false</EnablePREfast> </ClCompile> @@ -104,7 +104,7 @@ </PrecompiledHeader> <WarningLevel>Level4</WarningLevel> <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> <EnablePREfast>true</EnablePREfast> <AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions> @@ -123,7 +123,7 @@ <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <TreatWarningAsError>false</TreatWarningAsError> <EnablePREfast>false</EnablePREfast> </ClCompile> @@ -143,7 +143,7 @@ <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;LZ4_DLL_EXPORT=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <TreatWarningAsError>false</TreatWarningAsError> <EnablePREfast>true</EnablePREfast> <AdditionalOptions>/analyze:stacksize295252 %(AdditionalOptions)</AdditionalOptions> |