1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/dbm/extconf.rb (headers.db_check): reduce duplicated code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-11-12 08:01:51 +00:00
parent 0eb08aa068
commit 521f420a77
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Sat Nov 12 17:01:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/dbm/extconf.rb (headers.db_check): reduce duplicated code.
Sat Nov 12 15:59:42 2011 Tanaka Akira <akr@fsij.org>
* ext/dbm/extconf.rb: dbm_clearerr should be available in all ndbm

View file

@ -39,8 +39,8 @@ def headers.db_check(db)
have_library("gdbm") or return false
end
if (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)}) and
hdrs = self.fetch(db, ["ndbm.h"])
if (hdr = hdrs.find {|h| have_type("DBM", h, hsearch)} || hdrs.find {|h| have_type("DBM", ["db.h", h], hsearch)}) and
(have_library(db, 'dbm_open("", 0, 0)', hdr, hsearch) || have_func('dbm_open("", 0, 0)', hdr, hsearch)) and
have_func('dbm_clearerr((DBM *)0)', hdr, hsearch)
if hsearch