summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-18 15:31:09 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-18 15:31:09 +0000
commitfcd8f78ea354d250353b693567a0eb68798844a8 (patch)
tree8f8c322fadb9d7d5207be692377ad908272a51c6
parent923bff74b1f63e0edb6a3f6d648dbf66b9196631 (diff)
* ext/dbm/extconf.rb: don't choose 'dbm' if _GDB_H_ is defined which
is available since GDBM 1.9 because 'gdbm_compat' is appropriate choise since GDBM 1.8.1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/dbm/extconf.rb7
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fb176272a3..c97609ca6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Feb 19 00:25:55 2012 Tanaka Akira <akr@fsij.org>
+
+ * ext/dbm/extconf.rb: don't choose 'dbm' if _GDB_H_ is defined which
+ is available since GDBM 1.9 because 'gdbm_compat' is appropriate
+ choise since GDBM 1.8.1.
+
Sat Feb 18 23:27:00 2012 Kenta Murata <mrkn@mrkn.jp>
* random.c: remove a duplicated comment.
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index 93f0f0531e..15a4702dd8 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -141,6 +141,13 @@ def headers.db_check2(db, hdr)
# The original ndbm is provided by libc in 4.3BSD.
have_ndbm_header_macro = have_macro('_DBM_IOERR', hdr, hsearch)
+ # GDBM provides NDBM functions in libgdbm_compat since GDBM 1.8.1.
+ # GDBM's ndbm.h defines _GDBM_H_ since GDBM 1.9.
+ # So, reject 'gdbm'. 'gdbm_compat' is required.
+ if have_gdbm_header_macro && db == 'gdbm'
+ return false
+ end
+
# ndbm.h is provided by the original (4.3BSD) dbm,
# Berkeley DB 1 in libc of 4.4BSD and
# ndbm compatibility layer of gdbm.