summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'patchsets/patches-1.9.3_p0/007_berkdb-5.0.patch')
-rw-r--r--patchsets/patches-1.9.3_p0/007_berkdb-5.0.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/patchsets/patches-1.9.3_p0/007_berkdb-5.0.patch b/patchsets/patches-1.9.3_p0/007_berkdb-5.0.patch
new file mode 100644
index 0000000..88d3858
--- /dev/null
+++ b/patchsets/patches-1.9.3_p0/007_berkdb-5.0.patch
@@ -0,0 +1,30 @@
+--- ruby-1.9.3-preview1.orig/ext/dbm/extconf.rb
++++ ruby-1.9.3-preview1/ext/dbm/extconf.rb
+@@ -24,12 +24,12 @@ headers = {
+ def headers.db_check(db)
+ db_prefix = nil
+ have_gdbm = false
+- hsearch = nil
++ db_defs = nil
+
+ case db
+ when /^db[2-5]?$/
+ db_prefix = "__db_n"
+- hsearch = "-DDB_DBM_HSEARCH "
++ db_defs = %w[-DDB_DBM_HSEARCH -DHAVE_DBM]
+ when "gdbm"
+ have_gdbm = true
+ when "gdbm_compat"
+@@ -39,10 +39,9 @@ def headers.db_check(db)
+ db_prefix ||= ""
+
+ if (have_library(db, db_prefix+"dbm_open") || have_func(db_prefix+"dbm_open")) and
+- hdr = self.fetch(db, ["ndbm.h"]).find {|h| have_type("DBM", h, hsearch)} or
+- hdr = self.fetch(db, ["ndbm.h"]).find {|h| have_type("DBM", ["db.h", h], hsearch)}
++ hdr = self.fetch(db, ["ndbm.h"]).find {|h| have_type("DBM", h, db_defs.join(" "))}
+ have_func(db_prefix+"dbm_clearerr") unless have_gdbm
+- $defs << hsearch if hsearch
++ $defs += db_defs if db_defs
+ $defs << '-DDBM_HDR="<'+hdr+'>"'
+ true
+ else