summaryrefslogtreecommitdiff
path: root/ext/dbm
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-20 15:00:35 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-20 15:00:35 +0000
commita1292c72efae2aae02009de870c8a144083b6c02 (patch)
tree612dbcbb8d416741aa52ec47168eb644cb80cde2 /ext/dbm
parent07d8dffe827d3d94637ea51fe27b167b8032f498 (diff)
update comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dbm')
-rw-r--r--ext/dbm/extconf.rb30
1 files changed, 18 insertions, 12 deletions
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index ea6a4a9118..751fb40dd0 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -16,8 +16,8 @@ headers = {
"db3" => ["db3/db.h", "db3.h", "db.h"],
"db4" => ["db4/db.h", "db4.h", "db.h"],
"db5" => ["db5/db.h", "db5.h", "db.h"],
- "gdbm_compat" => ["gdbm-ndbm.h", "ndbm.h", "gdbm/ndbm.h"], # gdbm since 1.8.1
- "gdbm" => ["gdbm-ndbm.h", "ndbm.h", "gdbm/ndbm.h"], # gdbm until 1.8.0
+ "gdbm_compat" => ["gdbm-ndbm.h", "ndbm.h", "gdbm/ndbm.h"], # GDBM since 1.8.1
+ "gdbm" => ["gdbm-ndbm.h", "ndbm.h", "gdbm/ndbm.h"], # GDBM until 1.8.0
"qdbm" => ["relic.h", "qdbm/relic.h"],
}
@@ -132,17 +132,17 @@ def headers.db_check2(db, hdr)
return false
end
- # Skip a mismatch of Berkeley DB's ndbm.h and old gdbm library.
+ # Skip a mismatch of Berkeley DB's ndbm.h and old GDBM library.
#
# dbm_clearerr() should be available for any ndbm implementation.
# It is available since the original (4.3BSD) ndbm and standardized by POSIX.
#
# However "can't resolve symbol 'dbm_clearerr'" problem may be caused by
- # header/library mismatch: Berkeley DB ndbm.h and gdbm library until 1.8.3.
- # gdbm (until 1.8.3) provides dbm_clearerr() as a empty macro in the header
+ # header/library mismatch: Berkeley DB ndbm.h and GDBM library until 1.8.3.
+ # GDBM (until 1.8.3) provides dbm_clearerr() as a empty macro in the header
# and the library don't provide dbm_clearerr().
# Berkeley DB provides dbm_clearerr() as a usual function.
- # So Berkeley DB header with gdbm library causes the problem.
+ # So Berkeley DB header with GDBM library causes the problem.
#
if !have_func('dbm_clearerr((DBM *)0)', hdr, hsearch)
return false
@@ -165,7 +165,7 @@ def headers.db_check2(db, hdr)
# The original ndbm is provided by libc in 4.3BSD.
have_ndbm_header = have_macro('_DBM_IOERR', hdr, hsearch)
- # GDBM provides NDBM functions in libgdbm_compat since GDBM 1.8.1.
+ # GDBM provides ndbm functions in libgdbm_compat since GDBM 1.8.1.
# GDBM's ndbm.h defines _GDBM_H_ since GDBM 1.9.
# If _GDBM_H_ is defined, 'gdbm_compat' is required and reject 'gdbm'.
if have_gdbm_header2 && db == 'gdbm'
@@ -177,11 +177,17 @@ def headers.db_check2(db, hdr)
$defs.push('-DRUBYDBM_GDBM_HEADER')
end
- # ndbm.h is provided by the original (4.3BSD) dbm,
+ # ndbm.h is provided by the original (4.3BSD) ndbm,
# Berkeley DB 1 in libc of 4.4BSD and
- # ndbm compatibility layer of gdbm.
+ # ndbm compatibility layer of GDBM.
# So, try to check header/library mismatch.
#
+ # Several (possibly historical) distributions provides libndbm.
+ # It may be Berkeley DB, GDBM or 4.3BSD ndbm.
+ # So mismatch check is not performed for that.
+ # Note that libndbm is searched only when --with-dbm-type=ndbm is
+ # given for configure.
+ #
if hdr == 'ndbm.h' && db != 'libc' && db != 'ndbm'
if /\Adb\d?\z/ !~ db && have_db_header
return false
@@ -201,10 +207,10 @@ def headers.db_check2(db, hdr)
# GDBM
have_gdbm_version = have_declared_libvar("gdbm_version", hdr, hsearch)
- # gdbm_version is available since very old version (gdbm 1.5 at least).
- # However it is not declared by ndbm.h until gdbm 1.8.3.
+ # gdbm_version is available since very old version (GDBM 1.5 at least).
+ # However it is not declared by ndbm.h until GDBM 1.8.3.
# We can't include both ndbm.h and gdbm.h because they both define datum type.
- # ndbm.h includes gdbm.h and gdbm_version is declared since gdbm 1.9.
+ # ndbm.h includes gdbm.h and gdbm_version is declared since GDBM 1.9.
have_gdbm_version |= have_undeclared_libvar(["gdbm_version", "char *"], hdr, hsearch)
# QDBM