mdbx: add workaround for GCC 4.8 preprocessor bug.

Change-Id: I965cfbcd43596ef896a6b849dd043804bdb3f41f
This commit is contained in:
Leonid Yuriev 2021-05-03 14:44:15 +03:00
parent d6e67e3982
commit 7d54518d60

View File

@ -162,7 +162,11 @@
/** Presumed malloc size overhead for each allocation
* to adjust allocations to be more aligned. */
#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)
#endif
#elif MDBX_ASSUME_MALLOC_OVERHEAD < 0 || MDBX_ASSUME_MALLOC_OVERHEAD > 64 || \
MDBX_ASSUME_MALLOC_OVERHEAD % 4
#error MDBX_ASSUME_MALLOC_OVERHEAD must be defined in range 0..64 and be multiple of 4