summaryrefslogtreecommitdiff
path: root/ext/dbm/extconf.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-23 03:23:40 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-23 03:23:40 +0000
commitfd2e0e3dac68bd45fac8a51abf76408383ef0452 (patch)
treea0f1d7a51e699e1513cbc88a783aa6de45d425c8 /ext/dbm/extconf.rb
parent0585853c6916557dffef0a91635bc0004f70d68f (diff)
* ext/dbm/extconf.rb: use DBM_SUFFIX only to detect header of
Berkeley DB. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dbm/extconf.rb')
-rw-r--r--ext/dbm/extconf.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index e821690..00ac1a8 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -148,12 +148,10 @@ def headers.db_check2(db, hdr)
return false
end
- # Berkeley DB's ndbm.h (since 1.85 at least) includes db.h and
- # it defines _DB_H_.
- have_db_header = have_macro('_DB_H_', hdr, hsearch)
-
- # Mac OS X uses Berkeley DB 1 but ndbm.h doesn't include db.h.
- have_db_header |= have_macro('DBM_SUFFIX', hdr, hsearch)
+ # Berkeley DB's ndbm.h (since 1.85 at least) defines DBM_SUFFIX.
+ # Note that _DB_H_ is not defined on Mac OS X because
+ # it uses Berkeley DB 1 but ndbm.h doesn't include db.h.
+ have_db_header = have_macro('DBM_SUFFIX', hdr, hsearch)
# Old GDBM's ndbm.h, until 1.8.3, defines dbm_clearerr as a macro which
# expands to no tokens.