summaryrefslogtreecommitdiff
path: root/ext/dbm/extconf.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-07 11:17:17 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-07 11:17:17 +0000
commite4e5b7df4cca2cedba1ec2b52f75c450a0c618ce (patch)
tree98e4840ab87cb252aa98f3ae429568fa2441606e /ext/dbm/extconf.rb
parent66595f389473a4040e318fdfcc4b5d81cf8c2698 (diff)
* ext/dbm/extconf.rb: check dbm_pagfno() and dbm_dirfno().
* ext/dbm/dbm.c: use above to set close-on-exec flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dbm/extconf.rb')
-rw-r--r--ext/dbm/extconf.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index 91d393b..be4d030 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -21,6 +21,8 @@ headers = {
"qdbm" => ["relic.h", "qdbm/relic.h"],
}
+$dbm_headers = []
+
def headers.db_check(db)
db_prefix = nil
have_gdbm = false
@@ -44,6 +46,7 @@ def headers.db_check(db)
have_func(db_prefix+"dbm_clearerr") unless have_gdbm
$defs << hsearch if hsearch
$defs << '-DDBM_HDR="<'+hdr+'>"'
+ $dbm_headers << hdr
true
else
false
@@ -53,5 +56,7 @@ end
if dblib.any? {|db| headers.db_check(db)}
have_header("cdefs.h")
have_header("sys/cdefs.h")
+ have_func("dbm_pagfno", $dbm_headers)
+ have_func("dbm_dirfno", $dbm_headers)
create_makefile("dbm")
end