[前][次][番号順一覧][スレッド一覧]

ruby-changes:22711

From: akr <ko1@a...>
Date: Thu, 23 Feb 2012 12:23:54 +0900 (JST)
Subject: [ruby-changes:22711] akr:r34760 (trunk): * ext/dbm/extconf.rb: use DBM_SUFFIX only to detect header of

akr	2012-02-23 12:23:40 +0900 (Thu, 23 Feb 2012)

  New Revision: 34760

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34760

  Log:
    * ext/dbm/extconf.rb: use DBM_SUFFIX only to detect header of
      Berkeley DB.

  Modified files:
    trunk/ChangeLog
    trunk/ext/dbm/extconf.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 34759)
+++ ChangeLog	(revision 34760)
@@ -1,3 +1,8 @@
+Thu Feb 23 12:21:48 2012  Tanaka Akira  <akr@f...>
+
+	* ext/dbm/extconf.rb: use DBM_SUFFIX only to detect header of
+	  Berkeley DB.
+
 Thu Feb 23 10:00:18 2012  Eric Hodel  <drbrain@s...>
 
 	* io.c (rb_io_f_sync):  Fix double-negative typo.  [ruby-trunk - #5837]
Index: ext/dbm/extconf.rb
===================================================================
--- ext/dbm/extconf.rb	(revision 34759)
+++ ext/dbm/extconf.rb	(revision 34760)
@@ -148,13 +148,11 @@
     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)
+  # 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)
 
-  # Mac OS X 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.
   have_gdbm_header1 = have_empty_macro_dbm_clearerr(hdr, hsearch)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]