From: Hallvard Furuseth Date: Sun, 29 Dec 2013 13:54:17 +0000 (+0100) Subject: ITS#7665 Drop lmdb.h doc on non-overlapping flags. X-Git-Tag: OPENLDAP_REL_ENG_2_4_39~21^2~13 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=46de4ab84c57b417ca2faab38e341154a11d083c;p=openldap ITS#7665 Drop lmdb.h doc on non-overlapping flags. It was inaccurate and misplaced. Verify it in mdb.c instead. --- diff --git a/libraries/liblmdb/lmdb.h b/libraries/liblmdb/lmdb.h index ff8201786c..5f2216e36e 100644 --- a/libraries/liblmdb/lmdb.h +++ b/libraries/liblmdb/lmdb.h @@ -263,8 +263,6 @@ typedef int (MDB_cmp_func)(const MDB_val *a, const MDB_val *b); typedef void (MDB_rel_func)(MDB_val *item, void *oldptr, void *newptr, void *relctx); /** @defgroup mdb_env Environment Flags - * - * Values do not overlap Database Flags. * @{ */ /** mmap at a fixed address (experimental) */ @@ -292,8 +290,6 @@ typedef void (MDB_rel_func)(MDB_val *item, void *oldptr, void *newptr, void *rel /** @} */ /** @defgroup mdb_dbi_open Database Flags - * - * Values do not overlap Environment Flags. * @{ */ /** use reverse string keys */ diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index a8d0428ad2..78604712af 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -4011,6 +4011,10 @@ fail: #define CHANGELESS (MDB_FIXEDMAP|MDB_NOSUBDIR|MDB_RDONLY|MDB_WRITEMAP| \ MDB_NOTLS|MDB_NOLOCK|MDB_NORDAHEAD) +#if VALID_FLAGS & PERSISTENT_FLAGS & (CHANGEABLE|CHANGELESS) +# error "Persistent DB flags & env flags overlap, but both go in mm_flags" +#endif + int mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mdb_mode_t mode) {