class Object
Constants
- CONFTEST_C
Public Instance Methods
have_db_const(const)
click to toggle source
# File src/features.rb, line 47 def have_db_const(const) const.each do |c| print "checking for #{c} in db.h..." try_db_compile("CONST_#{c.tr_cpp}", "#include <db.h> int main() { int x = #{c}; return x; } ", "checking for #{c} in db.h... ") end end
have_db_member(where, array)
click to toggle source
# File src/features.rb, line 11 def have_db_member(where, array) found = false array.each do |st| if have_struct_member(where, st, 'db.h') $defs.pop $defs << "-DHAVE_ST_#{where}_#{st.tr_cpp}" found = true else $defs << "-DNOT_HAVE_ST_#{where}_#{st.tr_cpp}" end end found end
have_db_type(type)
click to toggle source
# File src/features.rb, line 25 def have_db_type(type) if have_type(type, 'db.h') true else $defs << "-DNOT_HAVE_TYPE_#{type.tr_cpp}" false end end
to_orig()
click to toggle source
static VALUE bdb_deleg_orig(VALUE obj) { return obj; }
try_db_compile(func, src, mess = nil)
click to toggle source
# File src/features.rb, line 34 def try_db_compile(func, src, mess = nil) print "checking for #{func}... " unless mess if try_compile(src) $defs << "-DHAVE_#{func}" puts "yes" true else $defs << "-DNOT_HAVE_#{func}" puts "no" false end end
try_db_link(func, src)
click to toggle source
# File src/features.rb, line 62 def try_db_link(func, src) if try_link(src) $defs << "-DHAVE_#{func}" true else $defs << "-DNOT_HAVE_#{func}" false end end
try_db_run(func, src)
click to toggle source
# File src/features.rb, line 72 def try_db_run(func, src) ENV['LD_LIBRARY_PATH'] = $bdb_libdir if try_run(src) $defs << "-DHAVE_#{func}" true else $defs << "-DNOT_HAVE_#{func}" false end ensure ENV['LD_LIBRARY_PATH'] = '' end