mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-30 22:47:16 +08:00
mdbx: fix static library build on Windows.
This commit is contained in:
parent
411ed3e578
commit
ed515d4642
12
mdbx.h
12
mdbx.h
@ -643,6 +643,13 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**** MDBX version information ************************************************/
|
/**** MDBX version information ************************************************/
|
||||||
|
|
||||||
|
#if defined(LIBMDBX_IMPORTS)
|
||||||
|
#define LIBMDBX_VERINFO_API __dll_import
|
||||||
|
#else
|
||||||
|
#define LIBMDBX_VERINFO_API __dll_export
|
||||||
|
#endif /* LIBMDBX_VERINFO_API */
|
||||||
|
|
||||||
typedef struct mdbx_version_info {
|
typedef struct mdbx_version_info {
|
||||||
uint8_t major;
|
uint8_t major;
|
||||||
uint8_t minor;
|
uint8_t minor;
|
||||||
@ -656,7 +663,7 @@ typedef struct mdbx_version_info {
|
|||||||
} git;
|
} git;
|
||||||
const char *sourcery /* sourcery anchor for pinning */;
|
const char *sourcery /* sourcery anchor for pinning */;
|
||||||
} mdbx_version_info;
|
} mdbx_version_info;
|
||||||
extern LIBMDBX_API const mdbx_version_info mdbx_version;
|
extern LIBMDBX_VERINFO_API const mdbx_version_info mdbx_version;
|
||||||
|
|
||||||
/* MDBX build information.
|
/* MDBX build information.
|
||||||
* WARNING: Some strings could be NULL in case no corresponding information was
|
* WARNING: Some strings could be NULL in case no corresponding information was
|
||||||
@ -668,8 +675,7 @@ typedef struct mdbx_build_info {
|
|||||||
const char *compiler /* compiler */;
|
const char *compiler /* compiler */;
|
||||||
const char *flags /* CFLAGS */;
|
const char *flags /* CFLAGS */;
|
||||||
} mdbx_build_info;
|
} mdbx_build_info;
|
||||||
|
extern LIBMDBX_VERINFO_API const mdbx_build_info mdbx_build;
|
||||||
extern LIBMDBX_API const mdbx_build_info mdbx_build;
|
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
#if !MDBX_BUILD_SHARED_LIBRARY
|
#if !MDBX_BUILD_SHARED_LIBRARY
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
static void mdbx_winnt_import(void);
|
static void mdbx_winnt_import(void);
|
||||||
|
|
||||||
#ifdef MDBX_BUILD_SHARED_LIBRARY
|
#if MDBX_BUILD_SHARED_LIBRARY
|
||||||
#if MDBX_AVOID_CRT && defined(NDEBUG)
|
#if MDBX_AVOID_CRT && defined(NDEBUG)
|
||||||
/* DEBUG/CHECKED builds still require MSVC's CRT for runtime checks.
|
/* DEBUG/CHECKED builds still require MSVC's CRT for runtime checks.
|
||||||
*
|
*
|
||||||
@ -35,7 +35,7 @@ static void mdbx_winnt_import(void);
|
|||||||
* automatically use DllMainCRTStartup() from CRT library, which also
|
* automatically use DllMainCRTStartup() from CRT library, which also
|
||||||
* automatically call DllMain() from our mdbx.dll */
|
* automatically call DllMain() from our mdbx.dll */
|
||||||
#pragma comment(linker, "/ENTRY:DllMain")
|
#pragma comment(linker, "/ENTRY:DllMain")
|
||||||
#endif
|
#endif /* MDBX_AVOID_CRT */
|
||||||
|
|
||||||
BOOL APIENTRY DllMain(HANDLE module, DWORD reason, LPVOID reserved)
|
BOOL APIENTRY DllMain(HANDLE module, DWORD reason, LPVOID reserved)
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user