Ext/dbm on ruby-1.8.5

e$B$3$s$P$s$O!#e(B

ext/dbme$B$N3HD%%i%$%V%i%j$,:[email protected]$5$l$F$$$J$$$3$H$K5$$,$D$-$^$7$?!#e(B

% uname -sr
NetBSD 4.99.1

ext/dbm/extconf.rbe$B$O!"e(B1.8.4e$B$+$ie(B1.8.5e$B$G!"e(B

diff -dup ruby-1.8.4/ext/dbm/extconf.rb ruby-1.8.5/ext/dbm/extconf.rb
— ruby-1.8.4/ext/dbm/extconf.rb 2003-07-24 16:41:36.000000000 +0900
+++ ruby-1.8.5/ext/dbm/extconf.rb 2006-05-26 08:44:05.000000000 +0900
@@ -33,7 +33,7 @@ def db_check(db)
if have_library(db, db_prefix(“dbm_open”)) ||
have_func(db_prefix(“dbm_open”))
for hdr in $dbm_conf_headers.fetch(db, [“ndbm.h”])
if have_header(hdr.dup) and have_type(“DBM”, hdr.dup, hsearch)

  • $CFLAGS += " " + hsearch + ‘-DDBM_HDR="<’+hdr+’>"’
  • $defs << hsearch << ‘-DDBM_HDR="<’+hdr+’>"’
    return true
    end
    end

e$B$H!"JQ99$5$l$F$$$^$9!#$=$7$F8e$NJ}$G!"e(B

if /DBM_HDR/ =~ $CFLAGS and have_func(db_prefix(“dbm_open”))

e$B$H$$$C$?e(B $CFLAGS e$B$NFbMF$r%A%’%C%/$7$F$$$^$9$,!"e(B$CFLAGS
e$B$K$Oe(B DBM_HDRe$B$He(B
e$B$$$C$?%Q%?!<%s$O4^$^$l$F$$$J$$$h$&$G$9!#$3$l$O!"e(B

— ext/dbm/extconf.rb.orig 2006-05-26 08:44:05.000000000 +0900
+++ ext/dbm/extconf.rb
@@ -55,7 +55,7 @@ end

have_header(“cdefs.h”)
have_header(“sys/cdefs.h”)
-if /DBM_HDR/ =~ $CFLAGS and have_func(db_prefix(“dbm_open”))
+if $defs.grep(/DBM_HDR/) and have_func(db_prefix(“dbm_open”))
have_func(db_prefix(“dbm_clearerr”)) unless $dbm_conf_have_gdbm
create_makefile(“dbm”)
end

e$B$H!"$9$k$H$&$^$/$$$-$^$7$?!#e(B

[email protected]$G$9!#e(B

At Sun, 3 Sep 2006 23:56:09 +0900,
Takahiro K. wrote in [ruby-dev:29445]:

if /DBM_HDR/ =~ $CFLAGS and have_func(db_prefix(“dbm_open”))

e$B$H$$$C$?e(B $CFLAGS e$B$NFbMF$r%A%’%C%/$7$F$$$^$9$,!"e(B$CFLAGS e$B$K$Oe(B DBM_HDRe$B$He(B
e$B$$$C$?%Q%?!<%s$O4^$^$l$F$$$J$$$h$&$G$9!#$3$l$O!"e(B

db_checke$B$N7k2L$r;H$C$?$[$&$,$$$$$h$&$J5$$,$7$^$9!#e(B

Index: ext/dbm/extconf.rb

RCS file: /cvs/ruby/src/ruby/ext/dbm/extconf.rb,v
retrieving revision 1.16.2.1
diff -p -U 2 -r1.16.2.1 extconf.rb
— ext/dbm/extconf.rb 25 May 2006 23:44:05 -0000 1.16.2.1
+++ ext/dbm/extconf.rb 3 Sep 2006 23:11:28 -0000
@@ -47,8 +47,8 @@ end

if dblib

  • db_check(dblib)
  • dbm_hdr = db_check(dblib)
    else
  • for dblib in %w(db db2 db1 dbm gdbm gdbm_compat qdbm)
  • db_check(dblib) and break
  • dbm_hdr = %w(db db2 db1 dbm gdbm gdbm_compat qdbm).any? do |dblib|
  • db_check(dblib)
    end
    end
    @@ -56,5 +56,5 @@ end
    have_header(“cdefs.h”)
    have_header(“sys/cdefs.h”)
    -if /DBM_HDR/ =~ $CFLAGS and have_func(db_prefix(“dbm_open”))
    +if dbm_hdr and have_func(db_prefix(“dbm_open”))
    have_func(db_prefix(“dbm_clearerr”)) unless $dbm_conf_have_gdbm
    create_makefile(“dbm”)

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:29449] Re: ext/dbm on ruby-1.8.5”
on Mon, 4 Sep 2006 11:15:54 +0900, [email protected] writes:

|At Sun, 3 Sep 2006 23:56:09 +0900,
|Takahiro K. wrote in [ruby-dev:29445]:
|> if /DBM_HDR/ =~ $CFLAGS and have_func(db_prefix(“dbm_open”))
|>
|> e$B$H$$$C$?e(B $CFLAGS e$B$NFbMF$r%A%’%C%/$7$F$$$^$9$,!"e(B$CFLAGS e$B$K$Oe(B DBM_HDRe$B$He(B
|> e$B$$$C$?%Q%?!<%s$O4^$^$l$F$$$J$$$h$&$G$9!#$3$l$O!"e(B
|
|db_checke$B$N7k2L$r;H$C$?$[$&$,$$$$$h$&$J5$$,$7$^$9!#e(B

CVSe$B$G$OBP1~$7$F$"$j$^$9$1$I!"[email protected]$5$s$N%Q%C%A$NJ}$,$+$C$3e(B
e$B$$$$$N$G!"%3%_%C%H$7$F$/[email protected]$5$$$^$;$s$+!#e(B

In message [email protected]
on Mon, 4 Sep 2006 11:15:54 +0900,
[email protected] wrote:

At Sun, 3 Sep 2006 23:56:09 +0900,
Takahiro K. wrote in [ruby-dev:29445]:

if /DBM_HDR/ =~ $CFLAGS and have_func(db_prefix(“dbm_open”))

e$B$H$$$C$?e(B $CFLAGS e$B$NFbMF$r%A%’%C%/$7$F$$$^$9$,!"e(B$CFLAGS e$B$K$Oe(B DBM_HDRe$B$He(B
e$B$$$C$?%Q%?!<%s$O4^$^$l$F$$$J$$$h$&$G$9!#$3$l$O!"e(B

db_checke$B$N7k2L$r;H$C$?$[$&$,$$$$$h$&$J5$$,$7$^$9!#e(B
e$B$h$/$o$+$C$F$$$J$/$F!"<h$j4:$($:BP=h$7$F$_$^$7$?$N$G!#e(B
e$BCfED$5$s$N%Q%C%A$Ge(B ext/dbm e$B$,:[email protected]$5$l$k$3$H$r3NG’$7$^$7$?!#e(B

(e$BB>$N%W%i%C%H%U%)!<%`$G$OBg>fIW$J$s$G$7$g$&$+e(B?)