mdbx: rename internal defines/macros to distinguish it from build options.

Change-Id: I42fe240e6ddd5d34c8fec38633849ebdcce0e116
This commit is contained in:
Leonid Yuriev
2021-04-29 19:50:25 +03:00
parent d27e48ae1b
commit 6b6165cdeb
14 changed files with 53 additions and 56 deletions

View File

@@ -35,7 +35,7 @@
#define _CRT_SECURE_NO_WARNINGS
#endif
#if !defined(_NO_CRT_STDIO_INLINE) && MDBX_BUILD_SHARED_LIBRARY && \
!defined(MDBX_TOOLS) && MDBX_WITHOUT_MSVC_CRT
!defined(xMDBX_TOOLS) && MDBX_WITHOUT_MSVC_CRT
#define _NO_CRT_STDIO_INLINE
#endif
#elif !defined(_POSIX_C_SOURCE)
@@ -155,7 +155,6 @@ __extern_C key_t ftok(const char *, int);
#define HAVE_SYS_TYPES_H
typedef HANDLE mdbx_thread_t;
typedef unsigned mdbx_thread_key_t;
#define MDBX_OSAL_SECTION HANDLE
#define MAP_FAILED NULL
#define HIGH_DWORD(v) ((DWORD)((sizeof(v) > 4) ? ((uint64_t)(v) >> 32) : 0))
#define THREAD_CALL WINAPI
@@ -440,10 +439,8 @@ typedef struct mdbx_mmap_param {
size_t limit; /* mapping length, but NOT a size of file nor DB */
size_t current; /* mapped region size, i.e. the size of file and DB */
#if defined(_WIN32) || defined(_WIN64)
uint64_t filesize /* in-process cache of a file size. */;
#endif
#ifdef MDBX_OSAL_SECTION
MDBX_OSAL_SECTION section;
uint64_t filesize /* in-process cache of a file size */;
HANDLE section; /* memory-mapped section handle */
#endif
} mdbx_mmap_t;