[前][次][番号順一覧][スレッド一覧]

ruby-changes:51995

From: hsbt <ko1@a...>
Date: Tue, 7 Aug 2018 20:18:46 +0900 (JST)
Subject: [ruby-changes:51995] hsbt:r64210 (trunk): Add support of Berkeley DB 6.x.

hsbt	2018-08-07 20:18:40 +0900 (Tue, 07 Aug 2018)

  New Revision: 64210

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64210

  Log:
    Add support of Berkeley DB 6.x.
    
      https://github.com/ruby/dbm/pull/3
    
      Co-authored-by: Yasuhiro KIMURA <>

  Modified files:
    trunk/ext/dbm/dbm.c
    trunk/ext/dbm/extconf.rb
Index: ext/dbm/dbm.c
===================================================================
--- ext/dbm/dbm.c	(revision 64209)
+++ ext/dbm/dbm.c	(revision 64210)
@@ -994,7 +994,7 @@ fdbm_reject(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/dbm/dbm.c#L994
  *   It is based on dbm library in Unix Version 7 but has different API to
  *   support multiple databases in a process.
  * - {Berkeley DB}[http://en.wikipedia.org/wiki/Berkeley_DB] versions
- *   1 thru 5, also known as BDB and Sleepycat DB, now owned by Oracle
+ *   1 thru 6, also known as BDB and Sleepycat DB, now owned by Oracle
  *   Corporation.
  * - Berkeley DB 1.x, still found in 4.4BSD derivatives (FreeBSD, OpenBSD, etc).
  * - {gdbm}[http://www.gnu.org/software/gdbm/], the GNU implementation of dbm.
Index: ext/dbm/extconf.rb
===================================================================
--- ext/dbm/extconf.rb	(revision 64209)
+++ ext/dbm/extconf.rb	(revision 64210)
@@ -7,6 +7,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/dbm/extconf.rb#L7
 #   db          Berkeley DB (libdb)
 #   db2         Berkeley DB (libdb2)
 #   db1         Berkeley DB (libdb1)
+#   db6         Berkeley DB (libdb6)
 #   db5         Berkeley DB (libdb5)
 #   db4         Berkeley DB (libdb4)
 #   db3         Berkeley DB (libdb3)
@@ -23,7 +24,7 @@ dir_config("dbm") https://github.com/ruby/ruby/blob/trunk/ext/dbm/extconf.rb#L24
 if dblib = with_config("dbm-type", nil)
   dblib = dblib.split(/[ ,]+/)
 else
-  dblib = %w(libc db db2 db1 db5 db4 db3 gdbm_compat gdbm qdbm)
+  dblib = %w(libc db db2 db1 db6 db5 db4 db3 gdbm_compat gdbm qdbm)
 end
 
 headers = {
@@ -34,6 +35,7 @@ headers = { https://github.com/ruby/ruby/blob/trunk/ext/dbm/extconf.rb#L35
   "db3" => ["db3/db.h", "db3.h", "db.h"],
   "db4" => ["db4/db.h", "db4.h", "db.h"],
   "db5" => ["db5/db.h", "db5.h", "db.h"],
+  "db6" => ["db6/db.h", "db6.h", "db.h"],
   "gdbm_compat" => ["gdbm-ndbm.h", "gdbm/ndbm.h", "ndbm.h"], # GDBM since 1.8.1
   "gdbm" => ["gdbm-ndbm.h", "gdbm/ndbm.h", "ndbm.h"], # GDBM until 1.8.0
   "qdbm" => ["qdbm/relic.h", "relic.h"],
@@ -131,7 +133,7 @@ def headers.db_check2(db, hdr) https://github.com/ruby/ruby/blob/trunk/ext/dbm/extconf.rb#L133
   hsearch = nil
 
   case db
-  when /^db[2-5]?$/
+  when /^db[2-6]?$/
     hsearch = "-DDB_DBM_HSEARCH"
   when "gdbm_compat"
     have_library("gdbm") or return false

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]