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

ruby-changes:36925

From: usa <ko1@a...>
Date: Thu, 25 Dec 2014 19:02:34 +0900 (JST)
Subject: [ruby-changes:36925] usa:r49006 (trunk): * ext/fiddle/win32/libffi-3.2.1-mswin.patch: support mswin32.

usa	2014-12-25 19:01:41 +0900 (Thu, 25 Dec 2014)

  New Revision: 49006

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

  Log:
    * ext/fiddle/win32/libffi-3.2.1-mswin.patch: support mswin32.

  Modified files:
    trunk/ChangeLog
    trunk/ext/fiddle/win32/libffi-3.2.1-mswin.patch
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 49005)
+++ ChangeLog	(revision 49006)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Dec 25 19:01:13 2014  NAKAMURA Usaku  <usa@r...>
+
+	* ext/fiddle/win32/libffi-3.2.1-mswin.patch: support mswin32.
+
 Thu Dec 25 17:30:40 2014  Naohisa Goto  <ngotogenome@g...>
 
 	* gc.c (wmap_final_func): fix memory size shortage when realloc wmap.
Index: ext/fiddle/win32/libffi-3.2.1-mswin.patch
===================================================================
--- ext/fiddle/win32/libffi-3.2.1-mswin.patch	(revision 49005)
+++ ext/fiddle/win32/libffi-3.2.1-mswin.patch	(revision 49006)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ext/fiddle/win32/libffi-3.2.1-mswin.patch#L1
 diff -ru libffi-3.2.1/src/x86/ffi.c libffi-3.2.1/src/x86/ffi.c
 --- libffi-3.2.1/src/x86/ffi.c	2014-11-08 21:47:24.000000000 +0900
-+++ libffi-3.2.1/src/x86/ffi.c	2014-12-22 16:00:42.000000000 +0900
++++ libffi-3.2.1/src/x86/ffi.c	2014-12-25 18:46:14.806761900 +0900
 @@ -99,11 +99,13 @@
         i != 0;
         i--, p_arg += dir, p_argv += dir)
@@ -16,7 +16,37 @@ diff -ru libffi-3.2.1/src/x86/ffi.c libf https://github.com/ruby/ruby/blob/trunk/ext/fiddle/win32/libffi-3.2.1-mswin.patch#L16
  
  #ifdef X86_WIN64
        if (z > FFI_SIZEOF_ARG
-@@ -599,11 +601,13 @@
+@@ -202,6 +204,7 @@
+      on top of stack, so that those can be moved to registers by call-handler.  */
+   if (stack_args_count > 0)
+     {
++      int i;
+       if (dir < 0 && stack_args_count > 1)
+         {
+           /* Reverse order if iterating arguments backwards */
+@@ -210,7 +213,6 @@
+           *(ffi_arg*) p_stack_data[stack_args_count - 1] = tmp;
+         }
+       
+-      int i;
+       for (i = 0; i < stack_args_count; i++)
+         {
+           if (p_stack_data[i] != argp2)
+@@ -569,11 +571,12 @@
+        i < cif->nargs && passed_regs < max_stack_count;
+        i++, p_arg++)
+     {
++      size_t sz;
+       if ((*p_arg)->type == FFI_TYPE_FLOAT
+          || (*p_arg)->type == FFI_TYPE_STRUCT)
+         continue;
+ 
+-      size_t sz = (*p_arg)->size;
++      sz = (*p_arg)->size;
+       if(sz == 0 || sz > FFI_SIZEOF_ARG)
+         continue;
+ 
+@@ -599,11 +602,13 @@
         i != 0;
         i--, p_arg += dir, p_argv += dir)
      {
@@ -31,7 +61,7 @@ diff -ru libffi-3.2.1/src/x86/ffi.c libf https://github.com/ruby/ruby/blob/trunk/ext/fiddle/win32/libffi-3.2.1-mswin.patch#L61
  
  #ifdef X86_WIN64
        if (z > FFI_SIZEOF_ARG
-@@ -642,7 +646,7 @@
+@@ -642,7 +647,7 @@
  #endif
      }
  
@@ -40,6 +70,20 @@ diff -ru libffi-3.2.1/src/x86/ffi.c libf https://github.com/ruby/ruby/blob/trunk/ext/fiddle/win32/libffi-3.2.1-mswin.patch#L70
  }
  
  #define FFI_INIT_TRAMPOLINE_WIN64(TRAMP,FUN,CTX,MASK) \
+@@ -855,11 +860,12 @@
+   
+   for (i = 0; i < cif->nargs && passed_regs <= max_regs; i++)
+     {
++      size_t sz;
+       if (cif->arg_types[i]->type == FFI_TYPE_FLOAT
+          || cif->arg_types[i]->type == FFI_TYPE_STRUCT)
+         continue;
+ 
+-      size_t sz = cif->arg_types[i]->size;
++      sz = cif->arg_types[i]->size;
+       if (sz == 0 || sz > FFI_SIZEOF_ARG)
+         continue;
+ 
 diff -ru libffi-3.2.1/src/x86/ffitarget.h libffi-3.2.1/src/x86/ffitarget.h
 --- libffi-3.2.1/src/x86/ffitarget.h	2014-11-08 21:47:24.000000000 +0900
 +++ libffi-3.2.1/src/x86/ffitarget.h	2014-12-22 15:45:54.000000000 +0900

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

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