diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 16b32344..9d9737da 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -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'] diff --git a/GNUmakefile b/GNUmakefile index ec9ccf8b..a99dcbe0 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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)) \ diff --git a/src/core.c b/src/core.c index bf374fe8..c858605f 100644 --- a/src/core.c +++ b/src/core.c @@ -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;