[#45174] [ruby-trunk - Feature #5959][Assigned] Addrinfo#inspectname — Yui NARUSE <naruse@...>
9 messages
2012/02/02
[#45177] Re: [ruby-trunk - Feature #5959][Assigned] Addrinfo#inspectname
— Tanaka Akira <akr@...>
2012/02/02
2012年2月2日17:16 Yui NARUSE <naruse@airemix.jp>:
[#45178] Re: [ruby-trunk - Feature #5959][Assigned] Addrinfo#inspectname
— Tanaka Akira <akr@...>
2012/02/02
2012年2月2日18:12 Tanaka Akira <akr@fsij.org>:
[#45179] Re: [ruby-trunk - Feature #5959][Assigned] Addrinfo#inspectname
— "NARUSE, Yui" <naruse@...>
2012/02/02
(2012/02/02 18:33), Tanaka Akira wrote:
[#45192] Re: [ruby-trunk - Feature #5959][Assigned] Addrinfo#inspectname
— Tanaka Akira <akr@...>
2012/02/05
2012年2月2日19:13 NARUSE, Yui <naruse@airemix.jp>:
[#45183] Plan to 1.9.3 1st patch release — "NARUSE, Yui" <naruse@...>
もう気分は 2.0 なので正直 1.9.3 とかどうでもいいんですけど(ぇー)、
8 messages
2012/02/03
[#45184] Re: Plan to 1.9.3 1st patch release
— KOSAKI Motohiro <kosaki.motohiro@...>
2012/02/03
> = backport 時のレビューの廃止
[ruby-dev:45269] Re: ext/dbmのデフォルトDBについて
From:
Tanaka Akira <akr@...>
Date:
2012-02-21 14:21:00 UTC
List:
ruby-dev #45269
2011年1月28日22:29 KOSAKI Motohiro <kosaki.motohiro@gmail.com>:
>
> 気づいている人もいると思うのですが、最近のBerkleyDBがはいっているシステムで
> test-all するとDBMのテストで
>
> DB->del: attempt to modify a read-only database
> DB->del: attempt to modify a read-only database
>
> と不愉快な出力が二回でます。(すくなくともうちのdb-4.8 は出ます)
> ソースをみたところ、抑止するAPIはあるにはあるのですが、dbm_hogehoge形式の
> 旧来と互換性のある形式では存在しません。つまりRubyのdbmバインディングからは
> 実質使えません。
古い話ですが、検索していて見つけたので。
まぁ、こんなでどうですかねぇ。
むりやり使ってみました。
% svn diff --diff-cmd diff -x -u ext/dbm/
Index: ext/dbm/dbm.c
===================================================================
--- ext/dbm/dbm.c (revision 34720)
+++ ext/dbm/dbm.c (working copy)
@@ -196,6 +196,12 @@
#if defined(HAVE_DBM_DIRFNO)
rb_fd_fix_cloexec(dbm_dirfno(dbm));
#endif
+
+#if defined(_DB_H_) && defined(HAVE_TYPE_DBC)
+ /* Disable Berkeley DB error messages such as:
+ * DB->put: attempt to modify a read-only database */
+ ((DBC*)dbm)->dbp->set_errfile(((DBC*)dbm)->dbp, NULL);
+#endif
}
if (!dbm) {
Index: ext/dbm/extconf.rb
===================================================================
--- ext/dbm/extconf.rb (revision 34720)
+++ ext/dbm/extconf.rb (working copy)
@@ -222,6 +222,11 @@
return false
end
+ # DBC type is required to disable error messages by Berkeley DB 2 or later.
+ if have_db_header
+ have_type("DBC", hdr, hsearch)
+ end
+
if hsearch
$defs << hsearch
@defs = hsearch
--
[田中 哲][たなか あきら][Tanaka Akira]