ruby-changes:22633
From: akr <ko1@a...>
Date: Sun, 19 Feb 2012 00:31:21 +0900 (JST)
Subject: [ruby-changes:22633] akr:r34682 (trunk): * ext/dbm/extconf.rb: don't choose 'dbm' if _GDB_H_ is defined which
akr 2012-02-19 00:31:09 +0900 (Sun, 19 Feb 2012) New Revision: 34682 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34682 Log: * ext/dbm/extconf.rb: don't choose 'dbm' if _GDB_H_ is defined which is available since GDBM 1.9 because 'gdbm_compat' is appropriate choise since GDBM 1.8.1. Modified files: trunk/ChangeLog trunk/ext/dbm/extconf.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 34681) +++ ChangeLog (revision 34682) @@ -1,3 +1,9 @@ +Sun Feb 19 00:25:55 2012 Tanaka Akira <akr@f...> + + * ext/dbm/extconf.rb: don't choose 'dbm' if _GDB_H_ is defined which + is available since GDBM 1.9 because 'gdbm_compat' is appropriate + choise since GDBM 1.8.1. + Sat Feb 18 23:27:00 2012 Kenta Murata <mrkn@m...> * random.c: remove a duplicated comment. Index: ext/dbm/extconf.rb =================================================================== --- ext/dbm/extconf.rb (revision 34681) +++ ext/dbm/extconf.rb (revision 34682) @@ -141,6 +141,13 @@ # The original ndbm is provided by libc in 4.3BSD. have_ndbm_header_macro = have_macro('_DBM_IOERR', hdr, hsearch) + # GDBM provides NDBM functions in libgdbm_compat since GDBM 1.8.1. + # GDBM's ndbm.h defines _GDBM_H_ since GDBM 1.9. + # So, reject 'gdbm'. 'gdbm_compat' is required. + if have_gdbm_header_macro && db == 'gdbm' + return false + end + # ndbm.h is provided by the original (4.3BSD) dbm, # Berkeley DB 1 in libc of 4.4BSD and # ndbm compatibility layer of gdbm. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/