* ext/dbm/extconf.rb: check _DB_H_ macro unavailable except

Berkeley DB library.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2012-02-16 15:05:46 +00:00
parent fde3c421be
commit 078b3cf95e
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Fri Feb 17 00:04:21 2012 Tanaka Akira <akr@fsij.org>
* ext/dbm/extconf.rb: check _DB_H_ macro unavailable except
Berkeley DB library.
Thu Feb 16 05:41:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* insns.def (splatarray): make new array if flag is set.

View File

@ -79,7 +79,8 @@ def headers.db_check2(db, hdr)
if have_type("DBM", hdr, hsearch) and
(db == 'libc' ? have_func('dbm_open("", 0, 0)', hdr, hsearch) :
have_library(db, 'dbm_open("", 0, 0)', hdr, hsearch)) and
have_func('dbm_clearerr((DBM *)0)', hdr, hsearch)
have_func('dbm_clearerr((DBM *)0)', hdr, hsearch) and
(/\Adb\d?\z/ =~ db || db == 'libc' || !have_macro('_DB_H_', hdr, hsearch)) # _DB_H_ should not be defined except Berkeley DB.
case db
when /\Adb\d?\z/
have_func('db_version((int *)0, (int *)0, (int *)0)', hdr, hsearch)