mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-01 23:04: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))
|
#if !(defined(_WIN32) || defined(_WIN64))
|
||||||
#define MDBX_LOCKNAME "/mdbx.lck"
|
#define MDBX_LOCKNAME "/mdbx.lck"
|
||||||
#else
|
#else
|
||||||
#define MDBX_LOCKNAME L"\\mdbx.lck"
|
#define MDBX_LOCKNAME_W L"\\mdbx.lck"
|
||||||
#endif
|
#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 */
|
#endif /* MDBX_LOCKNAME */
|
||||||
#ifndef MDBX_DATANAME
|
#ifndef MDBX_DATANAME
|
||||||
/** \brief The name of the data file in the environment
|
/** \brief The name of the data file in the environment
|
||||||
@ -839,8 +845,14 @@ enum MDBX_constants {
|
|||||||
#if !(defined(_WIN32) || defined(_WIN64))
|
#if !(defined(_WIN32) || defined(_WIN64))
|
||||||
#define MDBX_DATANAME "/mdbx.dat"
|
#define MDBX_DATANAME "/mdbx.dat"
|
||||||
#else
|
#else
|
||||||
#define MDBX_DATANAME L"\\mdbx.dat"
|
#define MDBX_DATANAME_W L"\\mdbx.dat"
|
||||||
#endif
|
#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 */
|
#endif /* MDBX_DATANAME */
|
||||||
|
|
||||||
#ifndef MDBX_LOCK_SUFFIX
|
#ifndef MDBX_LOCK_SUFFIX
|
||||||
@ -848,8 +860,14 @@ enum MDBX_constants {
|
|||||||
#if !(defined(_WIN32) || defined(_WIN64))
|
#if !(defined(_WIN32) || defined(_WIN64))
|
||||||
#define MDBX_LOCK_SUFFIX "-lck"
|
#define MDBX_LOCK_SUFFIX "-lck"
|
||||||
#else
|
#else
|
||||||
#define MDBX_LOCK_SUFFIX L"-lck"
|
#define MDBX_LOCK_SUFFIX_W L"-lck"
|
||||||
#endif
|
#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 */
|
#endif /* MDBX_LOCK_SUFFIX */
|
||||||
|
|
||||||
/* DEBUG & LOGGING ************************************************************/
|
/* DEBUG & LOGGING ************************************************************/
|
||||||
|
@ -128,6 +128,10 @@
|
|||||||
#define __USE_MINGW_ANSI_STDIO 1
|
#define __USE_MINGW_ANSI_STDIO 1
|
||||||
#endif /* __USE_MINGW_ANSI_STDIO */
|
#endif /* __USE_MINGW_ANSI_STDIO */
|
||||||
|
|
||||||
|
#if (defined(_WIN32) || defined(_WIN64)) && !defined(UNICODE)
|
||||||
|
#define UNICODE
|
||||||
|
#endif /* UNICODE */
|
||||||
|
|
||||||
#include "../mdbx.h"
|
#include "../mdbx.h"
|
||||||
#include "base.h"
|
#include "base.h"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user