Skip to content

Commit 60aa95e

Browse files
author
Ilya Miheev
committed
new v14_1 version of mdbx
1 parent 61457fd commit 60aa95e

25 files changed

+2338
-1739
lines changed

mdbxdist/.clang-format-ignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
mdbx.c
2+
mdbx.c++
3+
mdbx_chk.c
4+
mdbx_copy.c
5+
mdbx_drop.c
6+
mdbx_dump.c
7+
mdbx_load.c
8+
mdbx_stat.c

mdbxdist/CMakeLists.txt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2020-2024 Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> ###############################################
1+
# Copyright (c) 2020-2025 Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> ###############################################
22
# SPDX-License-Identifier: Apache-2.0
33
#
44
# Donations are welcome to ETH `0xD104d8f8B2dC312aaD74899F83EBf3EEBDC1EA3A`. Всё будет хорошо!
@@ -149,6 +149,9 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git"
149149
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tree-ops.c"
150150
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txl.c"
151151
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txl.h"
152+
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn-basal.c"
153+
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn-nested.c"
154+
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn-ro.c"
152155
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn.c"
153156
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/unaligned.h"
154157
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/utils.c"
@@ -213,6 +216,20 @@ if(DEFINED PROJECT_NAME AND NOT MDBX_FORCE_BUILD_AS_MAIN_PROJECT)
213216
else()
214217
set(SUBPROJECT OFF)
215218
set(NOT_SUBPROJECT ON)
219+
220+
# Setup Apple stuff which should be set prior to the first project() or enable_language()
221+
if(APPLE)
222+
# Enable universal binaries for macOS (target arm64 and x86_64)
223+
if(NOT DEFINED CMAKE_OSX_ARCHITECTURES)
224+
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
225+
endif()
226+
227+
# Set the minimum macOS deployment target if not already defined
228+
if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
229+
set(CMAKE_OSX_DEPLOYMENT_TARGET "13.0")
230+
endif()
231+
endif()
232+
216233
project(libmdbx C)
217234
if(NOT MDBX_AMALGAMATED_SOURCE AND NOT DEFINED BUILD_TESTING)
218235
set(BUILD_TESTING ON)
@@ -824,6 +841,9 @@ else()
824841
"${MDBX_SOURCE_DIR}/tree-ops.c"
825842
"${MDBX_SOURCE_DIR}/txl.c"
826843
"${MDBX_SOURCE_DIR}/txl.h"
844+
"${MDBX_SOURCE_DIR}/txn-basal.c"
845+
"${MDBX_SOURCE_DIR}/txn-nested.c"
846+
"${MDBX_SOURCE_DIR}/txn-ro.c"
827847
"${MDBX_SOURCE_DIR}/txn.c"
828848
"${MDBX_SOURCE_DIR}/unaligned.h"
829849
"${MDBX_SOURCE_DIR}/utils.c"

mdbxdist/ChangeLog.md

Lines changed: 189 additions & 3 deletions
Large diffs are not rendered by default.

mdbxdist/NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ to the Telegram' group https://t.me/libmdbx.
1111
Donations are welcome to ETH `0xD104d8f8B2dC312aaD74899F83EBf3EEBDC1EA3A`.
1212
Всё будет хорошо!
1313

14-
Copyright 2015-2024 Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru>
14+
Copyright 2015-2025 Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru>
1515
SPDX-License-Identifier: Apache-2.0
1616
For notes about the license change, credits and acknowledgments,
1717
please refer to the COPYRIGHT file within original libmdbx source code

mdbxdist/README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
> with [`C` API description](https://libmdbx.dqdkfa.ru/group__c__api.html)
55
> and pay attention to the [`C++` API](https://gitflic.ru/project/erthink/libmdbx/blob?file=mdbx.h%2B%2B#line-num-1).
66
7-
> Questions, feedback and suggestions are welcome to the [Telegram' group](https://t.me/libmdbx).
7+
> Questions, feedback and suggestions are welcome to the [Telegram' group](https://t.me/libmdbx) (archive [1](https://libmdbx.dqdkfa.ru/tg-archive/messages1.html),
8+
> [2](https://libmdbx.dqdkfa.ru/tg-archive/messages2.html), [3](https://libmdbx.dqdkfa.ru/tg-archive/messages3.html), [4](https://libmdbx.dqdkfa.ru/tg-archive/messages4.html),
9+
> [5](https://libmdbx.dqdkfa.ru/tg-archive/messages5.html), [6](https://libmdbx.dqdkfa.ru/tg-archive/messages6.html), [7](https://libmdbx.dqdkfa.ru/tg-archive/messages7.html)).
810
> See the [ChangeLog](https://gitflic.ru/project/erthink/libmdbx/blob?file=ChangeLog.md) for `NEWS` and latest updates.
911
1012
> Donations are welcome to ETH `0xD104d8f8B2dC312aaD74899F83EBf3EEBDC1EA3A`.
@@ -634,19 +636,24 @@ Bindings
634636

635637
| Runtime | Repo | Author |
636638
| ------- | ------ | ------ |
639+
| Rust | [libmdbx-rs](https://github.com/vorot93/libmdbx-rs) | [Artem Vorotnikov](https://github.com/vorot93) |
640+
| Python | [PyPi/libmdbx](https://pypi.org/project/libmdbx/) | [Lazymio](https://github.com/wtdcode) |
641+
| Java | [mdbxjni](https://github.com/castortech/mdbxjni) | [Castor Technologies](https://castortech.com/) |
642+
| Go | [mdbx-go](https://github.com/torquem-ch/mdbx-go) | [Alex Sharov](https://github.com/AskAlexSharov) |
643+
| Ruby | [ruby-mdbx](https://rubygems.org/gems/mdbx/) | [Mahlon E. Smith](https://github.com/mahlonsmith) |
644+
645+
##### Obsolete/Outdated/Unsupported:
646+
647+
| Runtime | Repo | Author |
648+
| ------- | ------ | ------ |
649+
| .NET | [mdbx.NET](https://github.com/wangjia184/mdbx.NET) | [Jerry Wang](https://github.com/wangjia184) |
637650
| Scala | [mdbx4s](https://github.com/david-bouyssie/mdbx4s) | [David Bouyssié](https://github.com/david-bouyssie) |
651+
| Rust | [mdbx](https://crates.io/crates/mdbx) | [gcxfd](https://github.com/gcxfd) |
638652
| Haskell | [libmdbx-hs](https://hackage.haskell.org/package/libmdbx) | [Francisco Vallarino](https://github.com/fjvallarino) |
653+
| Lua | [lua-libmdbx](https://github.com/mah0x211/lua-libmdbx) | [Masatoshi Fukunaga](https://github.com/mah0x211) |
639654
| NodeJS, [Deno](https://deno.land/) | [lmdbx-js](https://github.com/kriszyp/lmdbx-js) | [Kris Zyp](https://github.com/kriszyp/)
640655
| NodeJS | [node-mdbx](https://www.npmjs.com/package/node-mdbx/) | [Сергей Федотов](mailto:sergey.fedotov@corp.mail.ru) |
641-
| Ruby | [ruby-mdbx](https://rubygems.org/gems/mdbx/) | [Mahlon E. Smith](https://github.com/mahlonsmith) |
642-
| Go | [mdbx-go](https://github.com/torquem-ch/mdbx-go) | [Alex Sharov](https://github.com/AskAlexSharov) |
643-
| [Nim](https://en.wikipedia.org/wiki/Nim_(programming_language)) | [NimDBX](https://github.com/snej/nimdbx) | [Jens Alfke](https://github.com/snej)
644-
| Lua | [lua-libmdbx](https://github.com/mah0x211/lua-libmdbx) | [Masatoshi Fukunaga](https://github.com/mah0x211) |
645-
| Rust | [libmdbx-rs](https://github.com/vorot93/libmdbx-rs) | [Artem Vorotnikov](https://github.com/vorot93) |
646-
| Rust | [mdbx](https://crates.io/crates/mdbx) | [gcxfd](https://github.com/gcxfd) |
647-
| Java | [mdbxjni](https://github.com/castortech/mdbxjni) | [Castor Technologies](https://castortech.com/) |
648-
| Python | [PyPi/libmdbx](https://pypi.org/project/libmdbx/) | [Lazymio](https://github.com/wtdcode) |
649-
| .NET (obsolete) | [mdbx.NET](https://github.com/wangjia184/mdbx.NET) | [Jerry Wang](https://github.com/wangjia184) |
656+
| Nim | [NimDBX](https://github.com/snej/nimdbx) | [Jens Alfke](https://github.com/snej)
650657

651658
<!-- section-end -->
652659

mdbxdist/VERSION.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "git_describe": "v0.14.0-53-g4730abe3", "git_timestamp": "2025-02-11T14:01:10+03:00", "git_tree": "045bfa04a0690584d8256d2d8ea3dffb1325b7d0", "git_commit": "4730abe3e55c95e53e05d2ffbd83ed6a7cb21fe5", "semver": "0.14.0.53" }

mdbxdist/cmake/compiler.cmake

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2010-2024 Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> ###############################################
1+
# Copyright (c) 2010-2025 Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> ###############################################
22
# SPDX-License-Identifier: Apache-2.0
33

44
if(CMAKE_VERSION VERSION_LESS 3.8.2)
@@ -502,7 +502,11 @@ if(CMAKE_COMPILER_IS_GNU${CMAKE_PRIMARY_LANG}
502502
AND CMAKE_GCC_RANLIB
503503
AND gcc_lto_wrapper)
504504
message(STATUS "Found GCC's LTO toolset: ${gcc_lto_wrapper}, ${CMAKE_GCC_AR}, ${CMAKE_GCC_RANLIB}")
505-
set(GCC_LTO_CFLAGS "-flto -fno-fat-lto-objects -fuse-linker-plugin")
505+
if(CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 11.4)
506+
set(GCC_LTO_CFLAGS "-flto -fno-fat-lto-objects -fuse-linker-plugin")
507+
else()
508+
set(GCC_LTO_CFLAGS "-flto=auto -fno-fat-lto-objects -fuse-linker-plugin")
509+
endif()
506510
set(GCC_LTO_AVAILABLE TRUE)
507511
message(STATUS "Link-Time Optimization by GCC is available")
508512
else()
@@ -541,13 +545,21 @@ if(CMAKE_COMPILER_IS_CLANG)
541545
if(regexp_valid)
542546
string(REGEX REPLACE "(^|\n.*)(.*programs: =)([^\n]+)((\n.*)|$)" "\\3" list ${clang_search_dirs})
543547
string(REPLACE ":" ";" list "${list}")
548+
set(libs_extra_subdirs "lib;../lib;lib64;../lib64;lib32;../lib32")
544549
foreach(dir IN LISTS list)
545550
get_filename_component(dir "${dir}" REALPATH)
546551
if(dir MATCHES ".*llvm.*" OR dir MATCHES ".*clang.*")
547-
list(APPEND clang_bindirs "${dir}")
552+
set(list_suffix "")
548553
else()
549-
list(APPEND clang_bindirs_x "${dir}")
554+
set(list_suffix "_x")
550555
endif()
556+
list(APPEND clang_bindirs${list_suffix} "${dir}")
557+
foreach(subdir IN LISTS libs_extra_subdirs)
558+
get_filename_component(subdir "${dir}/${subdir}" REALPATH)
559+
if(EXISTS "${subdir}")
560+
list(APPEND clang_libdirs${list_suffix} "${subdir}")
561+
endif()
562+
endforeach()
551563
endforeach()
552564
list(APPEND clang_bindirs "${clang_bindirs_x}")
553565
list(REMOVE_DUPLICATES clang_bindirs)
@@ -559,10 +571,11 @@ if(CMAKE_COMPILER_IS_CLANG)
559571
foreach(dir IN LISTS list)
560572
get_filename_component(dir "${dir}" REALPATH)
561573
if(dir MATCHES ".*llvm.*" OR dir MATCHES ".*clang.*")
562-
list(APPEND clang_libdirs "${dir}")
574+
set(list_suffix "")
563575
else()
564-
list(APPEND clang_libdirs_x "${dir}")
576+
set(list_suffix "_x")
565577
endif()
578+
list(APPEND clang_libdirs${list_suffix} "${dir}")
566579
endforeach()
567580
list(APPEND clang_libdirs "${clang_libdirs_x}")
568581
list(REMOVE_DUPLICATES clang_libdirs)
@@ -655,9 +668,7 @@ if(CMAKE_COMPILER_IS_CLANG)
655668
if(CMAKE_CLANG_AR
656669
AND CMAKE_CLANG_NM
657670
AND CMAKE_CLANG_RANLIB
658-
AND ((CLANG_LTO_PLUGIN AND CMAKE_LD_GOLD)
659-
OR (CMAKE_CLANG_LD AND NOT (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_NAME STREQUAL "Linux"))
660-
OR APPLE))
671+
AND ((CLANG_LTO_PLUGIN AND CMAKE_LD_GOLD) OR CMAKE_CLANG_LD OR APPLE))
661672
if(ANDROID AND CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 12)
662673
set(CLANG_LTO_AVAILABLE FALSE)
663674
message(

mdbxdist/cmake/profile.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2012-2024 Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> ###############################################
1+
# Copyright (c) 2012-2025 Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> ###############################################
22
# SPDX-License-Identifier: Apache-2.0
33

44
if(CMAKE_VERSION VERSION_LESS 3.8.2)

mdbxdist/cmake/utils.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2012-2024 Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> ###############################################
1+
# Copyright (c) 2012-2025 Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> ###############################################
22
# SPDX-License-Identifier: Apache-2.0
33

44
if(CMAKE_VERSION VERSION_LESS 3.8.2)

mdbxdist/man1/mdbx_chk.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.\" Copyright 2015-2024 Leonid Yuriev <leo@yuriev.ru>.
1+
.\" Copyright 2015-2025 Leonid Yuriev <leo@yuriev.ru>.
22
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
3-
.TH MDBX_CHK 1 "2024-08-29" "MDBX 0.13"
3+
.TH MDBX_CHK 1 "2025-01-14" "MDBX 0.14"
44
.SH NAME
55
mdbx_chk \- MDBX checking tool
66
.SH SYNOPSIS

0 commit comments

Comments
 (0)