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

ruby-changes:34404

From: nobu <ko1@a...>
Date: Sat, 21 Jun 2014 12:54:28 +0900 (JST)
Subject: [ruby-changes:34404] nobu:r46485 (trunk): fiddle/extconf.rb: supply 0

nobu	2014-06-21 12:54:19 +0900 (Sat, 21 Jun 2014)

  New Revision: 46485

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

  Log:
    fiddle/extconf.rb: supply 0
    
    * ext/fiddle/extconf.rb: supply 0 to fill RUBY_LIBFFI_MODVERSION
      with 3-digit.  libffi 3.1 returns just 2-digit.
      [ruby-core:62920] [Bug #9897]

  Modified files:
    trunk/ChangeLog
    trunk/ext/fiddle/extconf.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46484)
+++ ChangeLog	(revision 46485)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Jun 21 12:50:32 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/fiddle/extconf.rb: supply 0 to fill RUBY_LIBFFI_MODVERSION
+	  with 3-digit.  libffi 3.1 returns just 2-digit.
+	  [ruby-core:62920] [Bug #9897]
+
 Sat Jun 21 07:06:13 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* encoding.c (enc_find): [DOC] never accepted a symbol.
Index: ext/fiddle/extconf.rb
===================================================================
--- ext/fiddle/extconf.rb	(revision 46484)
+++ ext/fiddle/extconf.rb	(revision 46485)
@@ -7,7 +7,8 @@ dir_config 'libffi' https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extconf.rb#L7
 pkg_config("libffi")
 if ver = pkg_config("libffi", "modversion")
   ver = ver.gsub(/-rc\d+/, '') # If ver contains rc version, just ignored.
-  $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver.split('.') }})
+  ver = (ver.split('.') + [0,0])[0,3]
+  $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver }})
 end
 
 unless have_header('ffi.h')

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

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