From 20904659c3e8911e222a6d86cdddc114e75ca4d7 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 4 Oct 2014 23:33:04 +0000 Subject: 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 --- ext/gdbm/extconf.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ext/gdbm/extconf.rb') 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(< + +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 -- cgit v1.2.3