mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 01:24:12 +08:00
mdbx-windows: UNICODE-зависимое определение макросов MDBX_DATANAME, MDBX_LOCKNAME и MDBX_LOCK_SUFFIX.
This commit is contained in:
parent
98a2bd785a
commit
98e29fe628
30
mdbx.h
30
mdbx.h
@ -830,8 +830,14 @@ enum MDBX_constants {
|
||||
#if !(defined(_WIN32) || defined(_WIN64))
|
||||
#define MDBX_LOCKNAME "/mdbx.lck"
|
||||
#else
|
||||
#define MDBX_LOCKNAME L"\\mdbx.lck"
|
||||
#endif
|
||||
#define MDBX_LOCKNAME_W L"\\mdbx.lck"
|
||||
#define MDBX_LOCKNAME_A "\\mdbx.lck"
|
||||
#ifdef UNICODE
|
||||
#define MDBX_LOCKNAME MDBX_LOCKNAME_W
|
||||
#else
|
||||
#define MDBX_LOCKNAME MDBX_LOCKNAME_A
|
||||
#endif /* UNICODE */
|
||||
#endif /* Windows */
|
||||
#endif /* MDBX_LOCKNAME */
|
||||
#ifndef MDBX_DATANAME
|
||||
/** \brief The name of the data file in the environment
|
||||
@ -839,8 +845,14 @@ enum MDBX_constants {
|
||||
#if !(defined(_WIN32) || defined(_WIN64))
|
||||
#define MDBX_DATANAME "/mdbx.dat"
|
||||
#else
|
||||
#define MDBX_DATANAME L"\\mdbx.dat"
|
||||
#endif
|
||||
#define MDBX_DATANAME_W L"\\mdbx.dat"
|
||||
#define MDBX_DATANAME_A "\\mdbx.dat"
|
||||
#ifdef UNICODE
|
||||
#define MDBX_DATANAME MDBX_DATANAME_W
|
||||
#else
|
||||
#define MDBX_DATANAME MDBX_DATANAME_A
|
||||
#endif /* UNICODE */
|
||||
#endif /* Windows */
|
||||
#endif /* MDBX_DATANAME */
|
||||
|
||||
#ifndef MDBX_LOCK_SUFFIX
|
||||
@ -848,8 +860,14 @@ enum MDBX_constants {
|
||||
#if !(defined(_WIN32) || defined(_WIN64))
|
||||
#define MDBX_LOCK_SUFFIX "-lck"
|
||||
#else
|
||||
#define MDBX_LOCK_SUFFIX L"-lck"
|
||||
#endif
|
||||
#define MDBX_LOCK_SUFFIX_W L"-lck"
|
||||
#define MDBX_LOCK_SUFFIX_A "-lck"
|
||||
#ifdef UNICODE
|
||||
#define MDBX_LOCK_SUFFIX MDBX_LOCK_SUFFIX_W
|
||||
#else
|
||||
#define MDBX_LOCK_SUFFIX MDBX_LOCK_SUFFIX_A
|
||||
#endif /* UNICODE */
|
||||
#endif /* Windows */
|
||||
#endif /* MDBX_LOCK_SUFFIX */
|
||||
|
||||
/* DEBUG & LOGGING ************************************************************/
|
||||
|
@ -128,6 +128,10 @@
|
||||
#define __USE_MINGW_ANSI_STDIO 1
|
||||
#endif /* __USE_MINGW_ANSI_STDIO */
|
||||
|
||||
#if (defined(_WIN32) || defined(_WIN64)) && !defined(UNICODE)
|
||||
#define UNICODE
|
||||
#endif /* UNICODE */
|
||||
|
||||
#include "../mdbx.h"
|
||||
#include "base.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user