diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-16 19:37:22 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-16 19:37:22 +0300 |
commit | 2b2fccea368d2cf6639c037c771f65e4b285afdd (patch) | |
tree | 37ae7f9e0f8895bceb2e0824d9941b85e4aabac2 /plugins/Dbx_mdbx/src/libmdbx | |
parent | 634a32a8d9114b1da1ffd0dc2b78dde3060a731f (diff) |
fixes crash in mdbx under XP
Diffstat (limited to 'plugins/Dbx_mdbx/src/libmdbx')
-rw-r--r-- | plugins/Dbx_mdbx/src/libmdbx/src/lck-windows.c | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/plugins/Dbx_mdbx/src/libmdbx/src/lck-windows.c b/plugins/Dbx_mdbx/src/libmdbx/src/lck-windows.c index 0cd28d3bd4..0cf908aae0 100644 --- a/plugins/Dbx_mdbx/src/libmdbx/src/lck-windows.c +++ b/plugins/Dbx_mdbx/src/libmdbx/src/lck-windows.c @@ -29,7 +29,7 @@ static CRITICAL_SECTION rthc_critical_section; -static void NTAPI tls_callback(PVOID module, DWORD reason, PVOID reserved) { +void NTAPI tls_callback(PVOID module, DWORD reason, PVOID reserved) { (void)module; (void)reserved; switch (reason) { @@ -52,45 +52,6 @@ void mdbx_rthc_lock(void) { EnterCriticalSection(&rthc_critical_section); } void mdbx_rthc_unlock(void) { LeaveCriticalSection(&rthc_critical_section); } -/* *INDENT-OFF* */ -/* clang-format off */ -#if defined(_MSC_VER) -# pragma const_seg(push) -# pragma data_seg(push) - -# ifdef _WIN64 - /* kick a linker to create the TLS directory if not already done */ -# pragma comment(linker, "/INCLUDE:_tls_used") - /* Force some symbol references. */ -# pragma comment(linker, "/INCLUDE:mdbx_tls_callback") - /* specific const-segment for WIN64 */ -# pragma const_seg(".CRT$XLB") - const -# else - /* kick a linker to create the TLS directory if not already done */ -# pragma comment(linker, "/INCLUDE:__tls_used") - /* Force some symbol references. */ -# pragma comment(linker, "/INCLUDE:_mdbx_tls_callback") - /* specific data-segment for WIN32 */ -# pragma data_seg(".CRT$XLB") -# endif - - PIMAGE_TLS_CALLBACK mdbx_tls_callback = tls_callback; -# pragma data_seg(pop) -# pragma const_seg(pop) - -#elif defined(__GNUC__) -# ifdef _WIN64 - const -# endif - PIMAGE_TLS_CALLBACK mdbx_tls_callback __attribute__((section(".CRT$XLB"), used)) - = tls_callback; -#else -# error FIXME -#endif -/* *INDENT-ON* */ -/* clang-format on */ - /*----------------------------------------------------------------------------*/ #define LCK_SHARED 0 |