summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-04 12:44:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-04 12:44:33 +0000
commiteff9686dedf3525fe6ec6ea60d7a598893fe3dd3 (patch)
treeb187dc547a34d3a49ba76af5c34069f7db5ec740
parent7f0f585f322b141bfd2eea4e8ca99d20f847ab78 (diff)
* ext/dbm/extconf.rb: create makefile according to the result of check
for dbm header. fixed: [ruby-dev:29445] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/dbm/extconf.rb8
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 51e5001..652a3d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Sep 4 21:43:57 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/dbm/extconf.rb: create makefile according to the result of check
+ for dbm header. fixed: [ruby-dev:29445]
+
Mon Sep 4 21:39:42 2006 Tadayoshi Funaba <tadf@dotrb.org>
* lib/date.rb, lib/date/format.rb: updated based on date2 3.9.
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index 7a69acc..52ec688 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -46,16 +46,16 @@ def db_prefix(func)
end
if dblib
- db_check(dblib)
+ dbm_hdr = db_check(dblib)
else
- for dblib in %w(db db2 db1 dbm gdbm gdbm_compat qdbm)
- db_check(dblib) and break
+ dbm_hdr = %w(db db2 db1 dbm gdbm gdbm_compat qdbm).any? do |dblib|
+ db_check(dblib)
end
end
have_header("cdefs.h")
have_header("sys/cdefs.h")
-if /DBM_HDR/ =~ $defs.join(" ") and have_func(db_prefix("dbm_open"))
+if dbm_hdr and have_func(db_prefix("dbm_open"))
have_func(db_prefix("dbm_clearerr")) unless $dbm_conf_have_gdbm
create_makefile("dbm")
end