mdbx: merge branch master into devel.

Change-Id: Ic78177f8bc5ab3dc1826e4e00599f1a7d3087dda
This commit is contained in:
Leonid Yuriev 2021-03-29 00:00:43 +03:00
commit e0795227e4
3 changed files with 20 additions and 22 deletions

2
.github/FUNDING.yml vendored
View File

@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: 'https://sobe.ru/na/libmdbx'
custom: ['https://sobe.ru/na/libmdbx', 'https://paypal.me/erthink']

View File

@ -26,6 +26,7 @@ mandir ?= $(prefix)/man
# lib/bin suffix for multiarch/biarch, e.g. '.x86_64'
suffix ?=
INSTALL ?= install
CC ?= gcc
CFLAGS_EXTRA ?=
LD ?= ld
@ -60,7 +61,7 @@ LIBRARIES := libmdbx.a libmdbx.$(SO_SUFFIX)
TOOLS := mdbx_stat mdbx_copy mdbx_dump mdbx_load mdbx_chk mdbx_drop
MANPAGES := mdbx_stat.1 mdbx_copy.1 mdbx_dump.1 mdbx_load.1 mdbx_chk.1 mdbx_drop.1
.PHONY: mdbx all install clean
.PHONY: mdbx all install install-strip install-no-strip clean
all: $(LIBRARIES) $(TOOLS)
@ -421,12 +422,19 @@ cross-qemu:
done
#< dist-cutoff-end
install: $(LIBRARIES) $(TOOLS) $(HEADERS)
install -D -p -s -t $(DESTDIR)$(prefix)/bin$(suffix) $(TOOLS) && \
install -D -p -s -t $(DESTDIR)$(prefix)/lib$(suffix) $(filter-out libmdbx.a,$(LIBRARIES)) && \
install -D -p -t $(DESTDIR)$(prefix)/lib$(suffix) libmdbx.a && \
install -D -p -m 444 -t $(DESTDIR)$(prefix)/include $(HEADERS) && \
install -D -p -m 444 -t $(DESTDIR)$(mandir)/man1 $(addprefix $(MAN_SRCDIR), $(MANPAGES))
$(INSTALL) -D -p $(EXE_INSTALL_FLAGS) -t $(DESTDIR)$(prefix)/bin$(suffix) $(TOOLS) && \
$(INSTALL) -D -p $(EXE_INSTALL_FLAGS) -t $(DESTDIR)$(prefix)/lib$(suffix) $(filter-out libmdbx.a,$(LIBRARIES)) && \
$(INSTALL) -D -p -t $(DESTDIR)$(prefix)/lib$(suffix) libmdbx.a && \
$(INSTALL) -D -p -m 444 -t $(DESTDIR)$(prefix)/include $(HEADERS) && \
$(INSTALL) -D -p -m 444 -t $(DESTDIR)$(mandir)/man1 $(addprefix $(MAN_SRCDIR), $(MANPAGES))
install-strip: EXE_INSTALL_FLAGS = -s
install-strip: install
install-no-strip: EXE_INSTALL_FLAGS =
install-no-strip: install
uninstall:
rm -f $(addprefix $(DESTDIR)$(prefix)/bin$(suffix)/,$(TOOLS)) \

View File

@ -21071,28 +21071,18 @@ __cold int mdbx_env_set_option(MDBX_env *env, const MDBX_option_t option,
if (env->me_txn)
err = MDBX_EPERM /* unable change during transaction */;
else {
mdbx_dpl_clear(env->me_txn0->tw.dirtylist);
const unsigned value32 = (unsigned)value;
const pgno_t value32 = (pgno_t)value;
if (option == MDBX_opt_txn_dp_initial &&
env->me_options.dp_initial != value32) {
env->me_options.dp_initial = value32;
if (env->me_options.dp_limit < value32)
env->me_options.dp_limit = value32;
if (env->me_txn0->tw.dirtylist->detent < value32 &&
!mdbx_dpl_reserve(env->me_txn0, value32))
err = MDBX_ENOMEM;
else
env->me_options.dp_initial = value32;
}
if (option == MDBX_opt_txn_dp_limit &&
env->me_options.dp_limit != value32) {
if (env->me_txn0->tw.dirtylist->detent > value32 &&
!mdbx_dpl_reserve(env->me_txn0, value32))
err = MDBX_ENOMEM;
else {
if (env->me_options.dp_initial > value32)
env->me_options.dp_initial = value32;
env->me_options.dp_limit = value32;
}
env->me_options.dp_limit = value32;
if (env->me_options.dp_initial > value32)
env->me_options.dp_initial = value32;
}
}
break;