From 4adb1ab2d8af387dab6739808bbbdb6a366e267b Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Mon, 15 Jul 2019 00:29:46 +0300 Subject: [PATCH] mdbx: portability - rename lck-posix.c to lck-linux.c Change-Id: I0ecee2b1a5d8e664eb795e5f5df2fa2d3cb73c83 --- libmdbx.files | 26 +++++++++++++------------- libmdbx.includes | 2 -- packages/rpm/CMakeLists.txt | 6 +++--- src/{lck-posix.c => lck-linux.c} | 6 ++++++ 4 files changed, 22 insertions(+), 18 deletions(-) rename src/{lck-posix.c => lck-linux.c} (98%) diff --git a/libmdbx.files b/libmdbx.files index f147554a..e0d851ef 100644 --- a/libmdbx.files +++ b/libmdbx.files @@ -1,26 +1,19 @@ -CMakeLists.txt -README-RU.md -pcrf_test/CMakeLists.txt -src/tools/CMakeLists.txt -test/CMakeLists.txt -test/append.cc -test/copy.cc -test/ttl.cc -tutorial/CMakeLists.txt -tutorial/sample-mdbx.c AUTHORS +CMakeLists.txt LICENSE Makefile +README-RU.md README.md TODO.md mdbx.h src/bits.h src/defs.h -src/lck-posix.c +src/lck-linux.c src/lck-windows.c src/mdbx.c src/osal.c src/osal.h +src/tools/CMakeLists.txt src/tools/mdbx_chk.c src/tools/mdbx_copy.1 src/tools/mdbx_copy.c @@ -33,11 +26,16 @@ src/tools/mdbx_stat.c src/tools/wingetopt.c src/tools/wingetopt.h src/version.c +test/CMakeLists.txt test/actor.cc +test/append.cc test/base.h +test/cases.cc test/chrono.cc test/chrono.h +test/config.cc test/config.h +test/copy.cc test/dead.cc test/hill.cc test/jitter.cc @@ -46,16 +44,18 @@ test/keygen.h test/log.cc test/log.h test/main.cc -test/config.cc -test/cases.cc test/osal-unix.cc test/osal-windows.cc test/osal.h +test/pcrf/CMakeLists.txt test/test.cc test/test.h test/try.cc +test/ttl.cc test/utils.cc test/utils.h +tutorial/CMakeLists.txt tutorial/README.md tutorial/sample-bdb.txt tutorial/sample-mdb.txt +tutorial/sample-mdbx.c diff --git a/libmdbx.includes b/libmdbx.includes index 0b5ade56..eb512a01 100644 --- a/libmdbx.includes +++ b/libmdbx.includes @@ -2,5 +2,3 @@ src src/tools test -pcrf_test -tutorial diff --git a/packages/rpm/CMakeLists.txt b/packages/rpm/CMakeLists.txt index 55fbe964..5949e9f0 100644 --- a/packages/rpm/CMakeLists.txt +++ b/packages/rpm/CMakeLists.txt @@ -3,8 +3,8 @@ set(TARGET mdbx) project(${TARGET}) set(MDBX_VERSION_MAJOR 0) -set(MDBX_VERSION_MINOR 2) -set(MDBX_VERSION_RELEASE 0) +set(MDBX_VERSION_MINOR 3) +set(MDBX_VERSION_RELEASE 1) set(MDBX_VERSION_REVISION 0) set(MDBX_VERSION_STRING ${MDBX_VERSION_MAJOR}.${MDBX_VERSION_MINOR}.${MDBX_VERSION_RELEASE}) @@ -83,7 +83,7 @@ set(${TARGET}_SRC mdbx.h src/bits.h src/defs.h - src/lck-posix.c + src/lck-linux.c src/mdbx.c src/osal.c src/osal.h diff --git a/src/lck-posix.c b/src/lck-linux.c similarity index 98% rename from src/lck-posix.c rename to src/lck-linux.c index 49d5408c..e48d8e11 100644 --- a/src/lck-posix.c +++ b/src/lck-linux.c @@ -12,6 +12,12 @@ * . */ +#if !(defined(__linux__) || defined(__gnu_linux__)) +#error "This implementation of locking only supports Linux,\ + where is no interaction between the types of lock placed\ + by flock() and fcntl()." +#endif + #include "./bits.h" /* Some platforms define the EOWNERDEAD error code