diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-04 23:33:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-04 23:33:04 +0000 |
commit | 20904659c3e8911e222a6d86cdddc114e75ca4d7 (patch) | |
tree | beae9f767073c1860117c6311741b2076f179305 /ext/gdbm/extconf.rb | |
parent | ad48d998763c7d58ea7a90b00d280125659a74d1 (diff) |
gdbm: typed data
* ext/gdbm/gdbm.c (dbm_type): turn into typed data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/gdbm/extconf.rb')
-rw-r--r-- | ext/gdbm/extconf.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/gdbm/extconf.rb b/ext/gdbm/extconf.rb index 5a09492e5e..389bfb633f 100644 --- a/ext/gdbm/extconf.rb +++ b/ext/gdbm/extconf.rb @@ -3,5 +3,16 @@ require 'mkmf' dir_config("gdbm") if have_library("gdbm", "gdbm_open") and have_header("gdbm.h") + checking_for("sizeof(DBM) is available") { + if try_compile(<<SRC) +#include <gdbm.h> + +const int sizeof_DBM = (int)sizeof(DBM); +SRC + $defs << '-DDBM_SIZEOF_DBM=sizeof(DBM)' + else + $defs << '-DDBM_SIZEOF_DBM=0' + end + } create_makefile("gdbm") end |