Skip to content

Commit bf65d8c

Browse files
committed
mdbx++: workaround for MinGW build failures (backport).
1 parent 85eaae9 commit bf65d8c

File tree

10 files changed

+28
-28
lines changed

10 files changed

+28
-28
lines changed

VERSION.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "git_describe": "v0.13.10-36-g834438ea", "git_timestamp": "2026-01-11T22:37:00+03:00", "git_tree": "171354351e4bb58c503b4de83a1d5f63c691c37f", "git_commit": "834438ea7ac1a76089c608a82f2290c8390a90f4", "semver": "0.13.10.36" }
1+
{ "git_describe": "v0.13.10-37-g3d10d4df", "git_timestamp": "2026-01-11T22:48:32+03:00", "git_tree": "fabc0f6dec7d46968148522f0c1891dd563302c5", "git_commit": "3d10d4dfcddc12c59017dae1f3828925b441975d", "semver": "0.13.10.37" }

mdbx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#define xMDBX_ALLOY 1 /* alloyed build */
66

7-
#define MDBX_BUILD_SOURCERY 1dd9041024641ca497b8e16e3035423a10d4844487f0bca0330ed3dd00c857f4_v0_13_10_36_g834438ea
7+
#define MDBX_BUILD_SOURCERY 309b6afb2178139cd46b89e5f3526dc4052afb2dc55f8e211db56f73edbd6dad_v0_13_10_37_g3d10d4df
88

99
#define LIBMDBX_INTERNALS
1010
#define MDBX_DEPRECATED
@@ -37561,10 +37561,10 @@ __dll_export
3756137561
0,
3756237562
13,
3756337563
10,
37564-
36,
37564+
37,
3756537565
"", /* pre-release suffix of SemVer
37566-
0.13.10.36 */
37567-
{"2026-01-11T22:37:00+03:00", "171354351e4bb58c503b4de83a1d5f63c691c37f", "834438ea7ac1a76089c608a82f2290c8390a90f4", "v0.13.10-36-g834438ea"},
37566+
0.13.10.37 */
37567+
{"2026-01-11T22:48:32+03:00", "fabc0f6dec7d46968148522f0c1891dd563302c5", "3d10d4dfcddc12c59017dae1f3828925b441975d", "v0.13.10-37-g3d10d4df"},
3756837568
sourcery};
3756937569

3757037570
__dll_export

mdbx.c++

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/// \author Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> \date 2015-2026
33
/* clang-format off */
44

5-
#define MDBX_BUILD_SOURCERY 1dd9041024641ca497b8e16e3035423a10d4844487f0bca0330ed3dd00c857f4_v0_13_10_36_g834438ea
5+
#define MDBX_BUILD_SOURCERY 309b6afb2178139cd46b89e5f3526dc4052afb2dc55f8e211db56f73edbd6dad_v0_13_10_37_g3d10d4df
66

77
#define LIBMDBX_INTERNALS
88
#define MDBX_DEPRECATED
@@ -4415,10 +4415,10 @@ bool from_base64::is_erroneous() const noexcept {
44154415
#pragma warning(disable : 4251)
44164416
#endif /* MSVC */
44174417

4418-
MDBX_INSTALL_API_TEMPLATE(LIBMDBX_API_TYPE, buffer<legacy_allocator>);
4418+
MDBX_INSTALL_API_TEMPLATE(LIBMDBX_API_TYPE, buffer<legacy_allocator, default_capacity_policy>);
44194419

44204420
#if MDBX_CXX_HAS_POLYMORPHIC_ALLOCATOR
4421-
MDBX_INSTALL_API_TEMPLATE(LIBMDBX_API_TYPE, buffer<polymorphic_allocator>);
4421+
MDBX_INSTALL_API_TEMPLATE(LIBMDBX_API_TYPE, buffer<polymorphic_allocator, default_capacity_policy>);
44224422
#endif /* MDBX_CXX_HAS_POLYMORPHIC_ALLOCATOR */
44234423

44244424
#if defined(_MSC_VER)

mdbx.h++

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,11 @@
122122
#endif
123123

124124
#if !defined(_MSC_VER) || defined(__clang__)
125-
/* adequate compilers */
126-
#define MDBX_EXTERN_API_TEMPLATE(API_ATTRIBUTES, API_TYPENAME) extern template class API_ATTRIBUTES API_TYPENAME
127-
#define MDBX_INSTALL_API_TEMPLATE(API_ATTRIBUTES, API_TYPENAME) template class API_TYPENAME
125+
#define MDBX_EXTERN_API_TEMPLATE(API_ATTRIBUTES, ...) extern template class API_ATTRIBUTES __VA_ARGS__
126+
#define MDBX_INSTALL_API_TEMPLATE(API_ATTRIBUTES, ...) template class __VA_ARGS__
128127
#else
129-
/* stupid microsoft showing off */
130-
#define MDBX_EXTERN_API_TEMPLATE(API_ATTRIBUTES, API_TYPENAME) extern template class API_TYPENAME
131-
#define MDBX_INSTALL_API_TEMPLATE(API_ATTRIBUTES, API_TYPENAME) template class API_ATTRIBUTES API_TYPENAME
128+
#define MDBX_EXTERN_API_TEMPLATE(API_ATTRIBUTES, ...) extern template class __VA_ARGS__
129+
#define MDBX_INSTALL_API_TEMPLATE(API_ATTRIBUTES, ...) template class API_ATTRIBUTES __VA_ARGS__
132130
#endif
133131

134132
#if __cplusplus >= 201103L
@@ -1243,7 +1241,7 @@ struct LIBMDBX_API to_hex {
12431241
/// \brief Returns a buffer with a hexadecimal dump of a passed slice.
12441242
template <class ALLOCATOR = default_allocator, typename CAPACITY_POLICY = default_capacity_policy>
12451243
buffer<ALLOCATOR, CAPACITY_POLICY> as_buffer(const ALLOCATOR &allocator = ALLOCATOR()) const {
1246-
return make_buffer<ALLOCATOR>(*this, allocator);
1244+
return make_buffer<ALLOCATOR, CAPACITY_POLICY>(*this, allocator);
12471245
}
12481246

12491247
/// \brief Returns the buffer size in bytes needed for hexadecimal
@@ -1291,7 +1289,7 @@ struct LIBMDBX_API to_base58 {
12911289
/// [Base58](https://en.wikipedia.org/wiki/Base58) dump of a passed slice.
12921290
template <class ALLOCATOR = default_allocator, typename CAPACITY_POLICY = default_capacity_policy>
12931291
buffer<ALLOCATOR, CAPACITY_POLICY> as_buffer(const ALLOCATOR &allocator = ALLOCATOR()) const {
1294-
return make_buffer<ALLOCATOR>(*this, allocator);
1292+
return make_buffer<ALLOCATOR, CAPACITY_POLICY>(*this, allocator);
12951293
}
12961294

12971295
/// \brief Returns the buffer size in bytes needed for
@@ -1337,7 +1335,7 @@ struct LIBMDBX_API to_base64 {
13371335
/// [Base64](https://en.wikipedia.org/wiki/Base64) dump of a passed slice.
13381336
template <class ALLOCATOR = default_allocator, typename CAPACITY_POLICY = default_capacity_policy>
13391337
buffer<ALLOCATOR, CAPACITY_POLICY> as_buffer(const ALLOCATOR &allocator = ALLOCATOR()) const {
1340-
return make_buffer<ALLOCATOR>(*this, allocator);
1338+
return make_buffer<ALLOCATOR, CAPACITY_POLICY>(*this, allocator);
13411339
}
13421340

13431341
/// \brief Returns the buffer size in bytes needed for
@@ -1388,7 +1386,7 @@ struct LIBMDBX_API from_hex {
13881386
/// \brief Decodes hexadecimal dump from a passed slice to returned buffer.
13891387
template <class ALLOCATOR = default_allocator, typename CAPACITY_POLICY = default_capacity_policy>
13901388
buffer<ALLOCATOR, CAPACITY_POLICY> as_buffer(const ALLOCATOR &allocator = ALLOCATOR()) const {
1391-
return make_buffer<ALLOCATOR>(*this, allocator);
1389+
return make_buffer<ALLOCATOR, CAPACITY_POLICY>(*this, allocator);
13921390
}
13931391

13941392
/// \brief Returns the number of bytes needed for conversion
@@ -1428,7 +1426,7 @@ struct LIBMDBX_API from_base58 {
14281426
/// passed slice to returned buffer.
14291427
template <class ALLOCATOR = default_allocator, typename CAPACITY_POLICY = default_capacity_policy>
14301428
buffer<ALLOCATOR, CAPACITY_POLICY> as_buffer(const ALLOCATOR &allocator = ALLOCATOR()) const {
1431-
return make_buffer<ALLOCATOR>(*this, allocator);
1429+
return make_buffer<ALLOCATOR, CAPACITY_POLICY>(*this, allocator);
14321430
}
14331431

14341432
/// \brief Returns the number of bytes needed for conversion
@@ -1471,7 +1469,7 @@ struct LIBMDBX_API from_base64 {
14711469
/// passed slice to returned buffer.
14721470
template <class ALLOCATOR = default_allocator, typename CAPACITY_POLICY = default_capacity_policy>
14731471
buffer<ALLOCATOR, CAPACITY_POLICY> as_buffer(const ALLOCATOR &allocator = ALLOCATOR()) const {
1474-
return make_buffer<ALLOCATOR>(*this, allocator);
1472+
return make_buffer<ALLOCATOR, CAPACITY_POLICY>(*this, allocator);
14751473
}
14761474

14771475
/// \brief Returns the number of bytes needed for conversion
@@ -2838,11 +2836,13 @@ inline string<ALLOCATOR> make_string(const PRODUCER &producer, const ALLOCATOR &
28382836
return result;
28392837
}
28402838

2841-
MDBX_EXTERN_API_TEMPLATE(LIBMDBX_API_TYPE, buffer<legacy_allocator>);
2839+
#if !(defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)) || defined(LIBMDBX_EXPORTS)
2840+
MDBX_EXTERN_API_TEMPLATE(LIBMDBX_API_TYPE, buffer<legacy_allocator, default_capacity_policy>);
28422841

28432842
#if MDBX_CXX_HAS_POLYMORPHIC_ALLOCATOR
2844-
MDBX_EXTERN_API_TEMPLATE(LIBMDBX_API_TYPE, buffer<polymorphic_allocator>);
2843+
MDBX_EXTERN_API_TEMPLATE(LIBMDBX_API_TYPE, buffer<polymorphic_allocator, default_capacity_policy>);
28452844
#endif /* MDBX_CXX_HAS_POLYMORPHIC_ALLOCATOR */
2845+
#endif /* !MinGW || MDBX_EXPORTS */
28462846

28472847
/// \brief Combines data slice with boolean flag to represent result of certain operations.
28482848
struct value_result {

mdbx_chk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/// \copyright SPDX-License-Identifier: Apache-2.0
1919
/// \author Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> \date 2015-2026
2020

21-
#define MDBX_BUILD_SOURCERY 1dd9041024641ca497b8e16e3035423a10d4844487f0bca0330ed3dd00c857f4_v0_13_10_36_g834438ea
21+
#define MDBX_BUILD_SOURCERY 309b6afb2178139cd46b89e5f3526dc4052afb2dc55f8e211db56f73edbd6dad_v0_13_10_37_g3d10d4df
2222

2323
#define LIBMDBX_INTERNALS
2424
#define MDBX_DEPRECATED

mdbx_copy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/// \copyright SPDX-License-Identifier: Apache-2.0
1919
/// \author Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> \date 2015-2026
2020

21-
#define MDBX_BUILD_SOURCERY 1dd9041024641ca497b8e16e3035423a10d4844487f0bca0330ed3dd00c857f4_v0_13_10_36_g834438ea
21+
#define MDBX_BUILD_SOURCERY 309b6afb2178139cd46b89e5f3526dc4052afb2dc55f8e211db56f73edbd6dad_v0_13_10_37_g3d10d4df
2222

2323
#define LIBMDBX_INTERNALS
2424
#define MDBX_DEPRECATED

mdbx_drop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/// \copyright SPDX-License-Identifier: Apache-2.0
1919
/// \author Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> \date 2015-2026
2020

21-
#define MDBX_BUILD_SOURCERY 1dd9041024641ca497b8e16e3035423a10d4844487f0bca0330ed3dd00c857f4_v0_13_10_36_g834438ea
21+
#define MDBX_BUILD_SOURCERY 309b6afb2178139cd46b89e5f3526dc4052afb2dc55f8e211db56f73edbd6dad_v0_13_10_37_g3d10d4df
2222

2323
#define LIBMDBX_INTERNALS
2424
#define MDBX_DEPRECATED

mdbx_dump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/// \copyright SPDX-License-Identifier: Apache-2.0
1919
/// \author Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> \date 2015-2026
2020

21-
#define MDBX_BUILD_SOURCERY 1dd9041024641ca497b8e16e3035423a10d4844487f0bca0330ed3dd00c857f4_v0_13_10_36_g834438ea
21+
#define MDBX_BUILD_SOURCERY 309b6afb2178139cd46b89e5f3526dc4052afb2dc55f8e211db56f73edbd6dad_v0_13_10_37_g3d10d4df
2222

2323
#define LIBMDBX_INTERNALS
2424
#define MDBX_DEPRECATED

mdbx_load.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/// \copyright SPDX-License-Identifier: Apache-2.0
1919
/// \author Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> \date 2015-2026
2020

21-
#define MDBX_BUILD_SOURCERY 1dd9041024641ca497b8e16e3035423a10d4844487f0bca0330ed3dd00c857f4_v0_13_10_36_g834438ea
21+
#define MDBX_BUILD_SOURCERY 309b6afb2178139cd46b89e5f3526dc4052afb2dc55f8e211db56f73edbd6dad_v0_13_10_37_g3d10d4df
2222

2323
#define LIBMDBX_INTERNALS
2424
#define MDBX_DEPRECATED

mdbx_stat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/// \copyright SPDX-License-Identifier: Apache-2.0
1919
/// \author Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru> \date 2015-2026
2020

21-
#define MDBX_BUILD_SOURCERY 1dd9041024641ca497b8e16e3035423a10d4844487f0bca0330ed3dd00c857f4_v0_13_10_36_g834438ea
21+
#define MDBX_BUILD_SOURCERY 309b6afb2178139cd46b89e5f3526dc4052afb2dc55f8e211db56f73edbd6dad_v0_13_10_37_g3d10d4df
2222

2323
#define LIBMDBX_INTERNALS
2424
#define MDBX_DEPRECATED

0 commit comments

Comments
 (0)