mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 03:04:13 +08:00
mdbx: add workaround for GCC 4.8 preprocessor bug.
Change-Id: I965cfbcd43596ef896a6b849dd043804bdb3f41f
This commit is contained in:
parent
d6e67e3982
commit
7d54518d60
@ -162,7 +162,11 @@
|
|||||||
/** Presumed malloc size overhead for each allocation
|
/** Presumed malloc size overhead for each allocation
|
||||||
* to adjust allocations to be more aligned. */
|
* to adjust allocations to be more aligned. */
|
||||||
#ifndef MDBX_ASSUME_MALLOC_OVERHEAD
|
#ifndef MDBX_ASSUME_MALLOC_OVERHEAD
|
||||||
|
#ifdef __SIZEOF_POINTER__
|
||||||
|
#define MDBX_ASSUME_MALLOC_OVERHEAD (__SIZEOF_POINTER__ * 2u)
|
||||||
|
#else
|
||||||
#define MDBX_ASSUME_MALLOC_OVERHEAD (sizeof(void *) * 2u)
|
#define MDBX_ASSUME_MALLOC_OVERHEAD (sizeof(void *) * 2u)
|
||||||
|
#endif
|
||||||
#elif MDBX_ASSUME_MALLOC_OVERHEAD < 0 || MDBX_ASSUME_MALLOC_OVERHEAD > 64 || \
|
#elif MDBX_ASSUME_MALLOC_OVERHEAD < 0 || MDBX_ASSUME_MALLOC_OVERHEAD > 64 || \
|
||||||
MDBX_ASSUME_MALLOC_OVERHEAD % 4
|
MDBX_ASSUME_MALLOC_OVERHEAD % 4
|
||||||
#error MDBX_ASSUME_MALLOC_OVERHEAD must be defined in range 0..64 and be multiple of 4
|
#error MDBX_ASSUME_MALLOC_OVERHEAD must be defined in range 0..64 and be multiple of 4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user