diff options
author | George Hazan <ghazan@miranda.im> | 2020-05-24 14:54:23 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-05-24 14:54:23 +0300 |
commit | f7a7e6d784374f027b0133d797fb4d74c5580d0c (patch) | |
tree | 01428a9c3bc6cfb05dfe0838ae8d852e7c25d882 /libs/libmdbx | |
parent | 17a150659823dbcc7d03a026b1e36af2c17f2184 (diff) |
libmdbx.dll returned back to keep compatibility with Windows XP
Diffstat (limited to 'libs/libmdbx')
-rw-r--r-- | libs/libmdbx/libmdbx.vcxproj | 17 | ||||
-rw-r--r-- | libs/libmdbx/libmdbx.vcxproj.filters | 6 | ||||
-rw-r--r-- | libs/libmdbx/mdbx_chk.vcxproj | 2 | ||||
-rw-r--r-- | libs/libmdbx/mdbx_dump.vcxproj | 2 | ||||
-rw-r--r-- | libs/libmdbx/mdbx_load.vcxproj | 2 | ||||
-rw-r--r-- | libs/libmdbx/src/config.h | 1 | ||||
-rw-r--r-- | libs/libmdbx/src/src/miranda.c | 11 |
7 files changed, 32 insertions, 9 deletions
diff --git a/libs/libmdbx/libmdbx.vcxproj b/libs/libmdbx/libmdbx.vcxproj index 8990b4cc57..2bc578f5b2 100644 --- a/libs/libmdbx/libmdbx.vcxproj +++ b/libs/libmdbx/libmdbx.vcxproj @@ -22,13 +22,21 @@ <ProjectGuid>{6D19209B-ECE7-4B9C-941C-0AA2B484F199}</ProjectGuid> <ProjectName>libmdbx</ProjectName> <TargetName>libmdbx</TargetName> - <ConfigurationType>StaticLibrary</ConfigurationType> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <OutDir Condition="'$(Platform)'=='Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <OutDir Condition="'$(Platform)'=='x64'">$(SolutionDir)$(Configuration)64\</OutDir> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> + <GenerateManifest>false</GenerateManifest> + <EmbedManifest>false</EmbedManifest> + </PropertyGroup> + <Import Project="$(ProjectDir)..\..\build\vc.common\common.props" /> + <PropertyGroup> + <TargetExt>.mir</TargetExt> + <TargetPath>$(OutDir)$(TargetName)$(TargetExt)</TargetPath> </PropertyGroup> - <Import Project="$(ProjectDir)..\..\build\vc.common\slib.props" /> <ItemDefinitionGroup> <ClCompile> - <PreprocessorDefinitions>MDBX_DEBUG=1;__STDC_FORMAT_MACROS=1;__STDC_LIMIT_MACROS=1;__STDC_CONSTANT_MACROS=1;_HAS_EXCEPTIONS=1;MDBX_CONFIG_H=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>LIBMDBX_EXPORTS;MDBX_DEBUG=1;__STDC_FORMAT_MACROS=1;__STDC_LIMIT_MACROS=1;__STDC_CONSTANT_MACROS=1;_HAS_EXCEPTIONS=1;MDBX_CONFIG_H=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> <AdditionalDependencies>ntdll.lib;%(AdditionalDependencies)</AdditionalDependencies> @@ -45,6 +53,9 @@ <ClCompile Include="src\src\lck-windows.c"> <PrecompiledHeader>NotUsing</PrecompiledHeader> </ClCompile> + <ClCompile Include="src\src\miranda.c"> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + </ClCompile> <ClCompile Include="src\src\osal.c"> <PrecompiledHeader>NotUsing</PrecompiledHeader> </ClCompile> diff --git a/libs/libmdbx/libmdbx.vcxproj.filters b/libs/libmdbx/libmdbx.vcxproj.filters index df68382a06..fafad41329 100644 --- a/libs/libmdbx/libmdbx.vcxproj.filters +++ b/libs/libmdbx/libmdbx.vcxproj.filters @@ -14,6 +14,9 @@ <ClCompile Include="src\src\core.c"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="src\src\miranda.c"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="src\config.h"> @@ -22,8 +25,5 @@ <ClInclude Include="src\mdbx.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="src\stdafx.h"> - <Filter>Header Files</Filter> - </ClInclude> </ItemGroup> </Project>
\ No newline at end of file diff --git a/libs/libmdbx/mdbx_chk.vcxproj b/libs/libmdbx/mdbx_chk.vcxproj index 8ef370cbd9..2a87e619ee 100644 --- a/libs/libmdbx/mdbx_chk.vcxproj +++ b/libs/libmdbx/mdbx_chk.vcxproj @@ -27,7 +27,7 @@ </ImportGroup> <ItemDefinitionGroup> <ClCompile> - <PreprocessorDefinitions>MDBX_DEBUG=1;__STDC_FORMAT_MACROS=1;__STDC_LIMIT_MACROS=1;__STDC_CONSTANT_MACROS=1;_HAS_EXCEPTIONS=1;MDBX_CONFIG_H=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>LIBMDBX_IMPORTS;MDBX_DEBUG=1;__STDC_FORMAT_MACROS=1;__STDC_LIMIT_MACROS=1;__STDC_CONSTANT_MACROS=1;_HAS_EXCEPTIONS=1;MDBX_CONFIG_H=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> <AdditionalDependencies>ntdll.lib;%(AdditionalDependencies)</AdditionalDependencies> diff --git a/libs/libmdbx/mdbx_dump.vcxproj b/libs/libmdbx/mdbx_dump.vcxproj index 6589036b21..62038f7ae5 100644 --- a/libs/libmdbx/mdbx_dump.vcxproj +++ b/libs/libmdbx/mdbx_dump.vcxproj @@ -27,7 +27,7 @@ </ImportGroup> <ItemDefinitionGroup> <ClCompile> - <PreprocessorDefinitions>MDBX_DEBUG=1;__STDC_FORMAT_MACROS=1;__STDC_LIMIT_MACROS=1;__STDC_CONSTANT_MACROS=1;_HAS_EXCEPTIONS=1;MDBX_CONFIG_H=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>LIBMDBX_IMPORTS;MDBX_DEBUG=1;__STDC_FORMAT_MACROS=1;__STDC_LIMIT_MACROS=1;__STDC_CONSTANT_MACROS=1;_HAS_EXCEPTIONS=1;MDBX_CONFIG_H=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> <AdditionalDependencies>ntdll.lib;%(AdditionalDependencies)</AdditionalDependencies> diff --git a/libs/libmdbx/mdbx_load.vcxproj b/libs/libmdbx/mdbx_load.vcxproj index b0545c6dc1..bb51bcfe32 100644 --- a/libs/libmdbx/mdbx_load.vcxproj +++ b/libs/libmdbx/mdbx_load.vcxproj @@ -27,7 +27,7 @@ </ImportGroup> <ItemDefinitionGroup> <ClCompile> - <PreprocessorDefinitions>MDBX_DEBUG=1;__STDC_FORMAT_MACROS=1;__STDC_LIMIT_MACROS=1;__STDC_CONSTANT_MACROS=1;_HAS_EXCEPTIONS=1;MDBX_CONFIG_H=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>LIBMDBX_IMPORTS;MDBX_DEBUG=1;__STDC_FORMAT_MACROS=1;__STDC_LIMIT_MACROS=1;__STDC_CONSTANT_MACROS=1;_HAS_EXCEPTIONS=1;MDBX_CONFIG_H=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> <AdditionalDependencies>ntdll.lib;%(AdditionalDependencies)</AdditionalDependencies> diff --git a/libs/libmdbx/src/config.h b/libs/libmdbx/src/config.h index 960cb22fca..9d21e964d5 100644 --- a/libs/libmdbx/src/config.h +++ b/libs/libmdbx/src/config.h @@ -28,6 +28,7 @@ /* Windows */ #define MDBX_AVOID_CRT 0 +#define MDBX_CONFIG_MANUAL_TLS_CALLBACK 1 /* MacOS & iOS */ #define MDBX_OSX_SPEED_INSTEADOF_DURABILITY 0 diff --git a/libs/libmdbx/src/src/miranda.c b/libs/libmdbx/src/src/miranda.c new file mode 100644 index 0000000000..df8c2dd620 --- /dev/null +++ b/libs/libmdbx/src/src/miranda.c @@ -0,0 +1,11 @@ +#define WIN32_LEAN_AND_MEAN +#include <windows.h> + +#include "../config.h" +#include "../mdbx.h" + +BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +{ + mdbx_dll_handler(hModule, ul_reason_for_call, lpReserved); + return TRUE; +} |