mdbx: refines OFF_T_MAX if it is not defined.

Change-Id: Ic453140e01725493cad0c98e73244c747d5f490e
This commit is contained in:
Leonid Yuriev 2019-07-07 19:32:39 +03:00
parent 8606803344
commit 1f89c494ff

View File

@ -44,7 +44,8 @@ static __cold __attribute__((destructor)) void mdbx_global_destructor(void) {
/* lck */
#ifndef OFF_T_MAX
#define OFF_T_MAX (sizeof(off_t) > 4 ? INT64_MAX : INT32_MAX)
#define OFF_T_MAX \
((sizeof(off_t) > 4 ? INT64_MAX : INT32_MAX) & ~(size_t)0xffff)
#endif
#define LCK_WHOLE OFF_T_MAX