Getting optional LMDB support into Cytoplasm #43

Merged
jordan merged 14 commits from lda/Cytoplasm:lmdbwerk into master 2024-08-23 20:19:59 +00:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit a90c66736c - Show all commits

2
configure vendored
View file

@ -113,7 +113,7 @@ if [ -n "$TLS_IMPL" ]; then
fi fi
if [ -n "$EDB_IMPL" ]; then if [ -n "$EDB_IMPL" ]; then
CFLAGS="${CFLAGS} -DEDB_IMPL=${EDB_IMPL}" CFLAGS="${CFLAGS} -D${EDB_IMPL}"
LIBS="${LIBS} ${EDB_LIBS}" LIBS="${LIBS} ${EDB_LIBS}"
fi fi

View file

@ -9,7 +9,7 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#ifdef EDB_IMPL #ifdef EDB_LMDB
#include <lmdb.h> #include <lmdb.h>
@ -568,7 +568,7 @@ DbOpenLMDB(char *dir, size_t size)
return NULL; return NULL;
} }
mdb_env_set_maxdbs(env, 4); mdb_env_set_maxdbs(env, 4);
if ((code = mdb_env_open(env, dir, 0, 0644)) != 0) if ((code = mdb_env_open(env, dir, MDB_NOTLS, 0644)) != 0)
{ {
Log(LOG_ERR, Log(LOG_ERR,
"%s: could not open LMDB env: %s", "%s: could not open LMDB env: %s",
@ -589,7 +589,7 @@ DbOpenLMDB(char *dir, size_t size)
db->base.delete = LMDBDelete; db->base.delete = LMDBDelete;
db->base.exists = LMDBExists; db->base.exists = LMDBExists;
db->base.close = LMDBClose; db->base.close = LMDBClose;
db->base.list = LMDBList; /* TODO: This one is gonna be Fun. */ db->base.list = LMDBList;
return (Db *) db; return (Db *) db;
} }