Don't fail compiling against pre 0.13 versions.
I mostly want this library to remain in lockstep with what is considered the stable version of libmdbx, and if you require a past version, just pin it. In this case however, the breakage outweighs adding a simple compatibility check. Closes 1f1f5e4c44188a9cd1d9f83fd8fdb1afe3dd7e29. FossilOrigin-Name: 89b49806a28078e58b3c93f5fee2ff11290405a9c4b42ba11a4412d73eafd8aa
This commit is contained in:
parent
bdf7acea96
commit
a2d0fe8a5c
2 changed files with 7 additions and 0 deletions
|
|
@ -805,8 +805,13 @@ rmdbx_database_initialize( int argc, VALUE *argv, VALUE self )
|
|||
if ( RTEST(opt) ) db->settings.env_flags = db->settings.env_flags | MDBX_NOSUBDIR;
|
||||
opt = rb_hash_delete( opts, ID2SYM( rb_intern("no_readahead") ) );
|
||||
if ( RTEST(opt) ) db->settings.env_flags = db->settings.env_flags | MDBX_NORDAHEAD;
|
||||
#if defined(HAVE_CONST_MDBX_NOSTICKYTHREADS)
|
||||
opt = rb_hash_delete( opts, ID2SYM( rb_intern("no_stickythreads") ) );
|
||||
if ( RTEST(opt) ) db->settings.env_flags = db->settings.env_flags | MDBX_NOSTICKYTHREADS;
|
||||
#else
|
||||
opt = rb_hash_delete( opts, ID2SYM( rb_intern("no_threadlocal") ) );
|
||||
if ( RTEST(opt) ) db->settings.env_flags = db->settings.env_flags | MDBX_NOTLS;
|
||||
#endif
|
||||
opt = rb_hash_delete( opts, ID2SYM( rb_intern("readonly") ) );
|
||||
if ( RTEST(opt) ) db->settings.env_flags = db->settings.env_flags | MDBX_RDONLY;
|
||||
opt = rb_hash_delete( opts, ID2SYM( rb_intern("writemap") ) );
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ $CFLAGS << ' -Wno-unknown-warning-option'
|
|||
have_library( 'mdbx' ) or abort "No mdbx library!"
|
||||
have_header( 'mdbx.h' ) or abort "No mdbx.h header!"
|
||||
|
||||
have_const( 'MDBX_NOSTICKYTHREADS', 'mdbx.h' )
|
||||
|
||||
create_header()
|
||||
create_makefile( 'mdbx_ext' )
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue