summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/dbm/dbm.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1135ad5973..2963b8546e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Feb 18 12:50:59 2012 Tanaka Akira <akr@fsij.org>
+
+ * ext/dbm/dbm.c (DBM::VERSION): define it by detecting _GDBM_H_ or
+ _DBM_IOERR.
+
Sat Feb 18 07:52:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
* tool/enc-unicode.rb: don't use 1.9 feature on tools.
diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c
index cadc46446c..98de538dd0 100644
--- a/ext/dbm/dbm.c
+++ b/ext/dbm/dbm.c
@@ -1096,6 +1096,10 @@ Init_dbm(void)
rb_define_const(rb_cDBM, "VERSION", rb_sprintf("QDBM %s", dpversion));
#elif defined(_DB_H_)
rb_define_const(rb_cDBM, "VERSION", rb_str_new2("Berkeley DB (unknown)"));
+#elif defined(_GDBM_H_)
+ rb_define_const(rb_cDBM, "VERSION", rb_str_new2("GDBM (unknown)"));
+#elif defined(_DBM_IOERR)
+ rb_define_const(rb_cDBM, "VERSION", rb_str_new2("NDBM (4.3BSD)"));
#else
rb_define_const(rb_cDBM, "VERSION", rb_str_new2("unknown"));
#endif