summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-11 12:03:51 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-11 12:03:51 +0000
commit266d09839b436b2ecc1d95456db4771b5a8119db (patch)
treeec11374c83ca77b669d2ab59e2a495eb4a113bbb /ext
parent6cedbce87d273b7fc8c6d4099434da370c063fb7 (diff)
* ext/dbm/extconf.rb: fix dbm_pagfno and dbm_dirfno detection with
Berkeley DB. Macro definitions needs arguments to detect correctly. SIZEOF_DSIZE needs -DDB_DBM_HSEARCH because db.h defines datum type only if DB_DBM_HSEARCH is defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/dbm/extconf.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index fb722a3c39..608f4d472f 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -64,12 +64,12 @@ end
if dblib.any? {|db| headers.db_check(db)}
have_header("cdefs.h")
have_header("sys/cdefs.h")
- have_func("dbm_pagfno", headers.found, headers.defs)
- have_func("dbm_dirfno", headers.found, headers.defs)
+ have_func("dbm_pagfno((DBM *)0)", headers.found, headers.defs)
+ have_func("dbm_dirfno((DBM *)0)", headers.found, headers.defs)
type = checking_for "sizeof(datum.dsize)", STRING_OR_FAILED_FORMAT do
pre = headers.found + [["static datum conftest_key;"]]
%w[int long LONG_LONG].find do |t|
- try_static_assert("sizeof(conftest_key.dsize) <= sizeof(#{t})", pre)
+ try_static_assert("sizeof(conftest_key.dsize) <= sizeof(#{t})", pre, headers.defs)
end
end
$defs << "-DSIZEOF_DSIZE=SIZEOF_"+type.tr_cpp if type