From e04bfc05fa476915847a0a4d18ea6d22c7fff5ad Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Tue, 20 Aug 2019 15:04:32 +0300 Subject: [PATCH] mdbx: rename MDBX_OSX_SPEED_INSTEADOF_DURABILITY option. Change-Id: I1d0a05880507da0781ccd2bff5fa68610ad884a9 --- src/bits.h | 4 ++-- src/osal.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bits.h b/src/bits.h index 7660e50e..6fd077d8 100644 --- a/src/bits.h +++ b/src/bits.h @@ -25,8 +25,8 @@ #define MDBX_OSX_WANNA_DURABILITY 0 /* using fcntl(F_FULLFSYNC) with 5-10 times slowdown */ #define MDBX_OSX_WANNA_SPEED 1 /* using fsync() with chance of data lost on power failure */ -#ifndef MDBX_OSX_SPEED_OR_DURABILITY -#define MDBX_OSX_SPEED_OR_DURABILITY MDBX_OSX_WANNA_DURABILITY +#ifndef MDBX_OSX_SPEED_INSTEADOF_DURABILITY +#define MDBX_OSX_SPEED_INSTEADOF_DURABILITY MDBX_OSX_WANNA_DURABILITY #endif /*----------------------------------------------------------------------------*/ diff --git a/src/osal.c b/src/osal.c index 4e917a76..301bb8a1 100644 --- a/src/osal.c +++ b/src/osal.c @@ -669,7 +669,7 @@ int mdbx_filesync(mdbx_filehandle_t fd, enum mdbx_syncmode_bits mode_bits) { #else #if defined(__APPLE__) && \ - MDBX_OSX_SPEED_OR_DURABILITY == MDBX_OSX_WANNA_DURABILITY + MDBX_OSX_SPEED_INSTEADOF_DURABILITY == MDBX_OSX_WANNA_DURABILITY if (mode_bits & MDBX_SYNC_IODQ) return likely(fcntl(fd, F_FULLFSYNC) != -1) ? MDBX_SUCCESS : errno; #endif /* MacOS */ @@ -798,7 +798,7 @@ int mdbx_msync(mdbx_mmap_t *map, size_t offset, size_t length, int async) { const int mode = async ? MS_ASYNC : MS_SYNC; int rc = (msync(ptr, length, mode) == 0) ? MDBX_SUCCESS : errno; #if defined(__APPLE__) && \ - MDBX_OSX_SPEED_OR_DURABILITY == MDBX_OSX_WANNA_DURABILITY + MDBX_OSX_SPEED_INSTEADOF_DURABILITY == MDBX_OSX_WANNA_DURABILITY if (rc == MDBX_SUCCESS && mode == MS_SYNC) rc = likely(fcntl(map->fd, F_FULLFSYNC) != -1) ? MDBX_SUCCESS : errno; #endif /* MacOS */