Commits

Ken Takata committed a578f84

fold patches

  • Participants
  • Parent commits b2daa84

Comments (0)

Files changed (4)

fix-ruby20-msvc.patch

-# HG changeset patch
-# Parent 8506c0c94b948d7e1067a2e9e09e9c5b298d9c10
-diff --git a/src/if_ruby.c b/src/if_ruby.c
---- a/src/if_ruby.c
-+++ b/src/if_ruby.c
-@@ -39,6 +39,9 @@
-  */
- # define rb_cFalseClass		(*dll_rb_cFalseClass)
- # define rb_cFixnum		(*dll_rb_cFixnum)
-+# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
-+#  define rb_cFloat		(*dll_rb_cFloat)
-+# endif
- # define rb_cNilClass		(*dll_rb_cNilClass)
- # define rb_cSymbol		(*dll_rb_cSymbol)
- # define rb_cTrueClass		(*dll_rb_cTrueClass)
-@@ -249,6 +252,9 @@
- static VALUE (*dll_rb_assoc_new) (VALUE, VALUE);
- VALUE *dll_rb_cFalseClass;
- VALUE *dll_rb_cFixnum;
-+#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
-+VALUE *dll_rb_cFloat;
-+#endif
- VALUE *dll_rb_cNilClass;
- static VALUE *dll_rb_cObject;
- VALUE *dll_rb_cSymbol;
-@@ -373,6 +379,9 @@
-     {"rb_assoc_new", (RUBY_PROC*)&dll_rb_assoc_new},
-     {"rb_cFalseClass", (RUBY_PROC*)&dll_rb_cFalseClass},
-     {"rb_cFixnum", (RUBY_PROC*)&dll_rb_cFixnum},
-+#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
-+    {"rb_cFloat", (RUBY_PROC*)&dll_rb_cFloat},
-+#endif
-     {"rb_cNilClass", (RUBY_PROC*)&dll_rb_cNilClass},
-     {"rb_cObject", (RUBY_PROC*)&dll_rb_cObject},
-     {"rb_cSymbol", (RUBY_PROC*)&dll_rb_cSymbol},

fix-ruby20-x64-and-msvc.patch

+# HG changeset patch
+# Parent 275464eb3830ca97b43f29c6a0e0cf41afd936fc
+
+diff --git a/src/Make_cyg.mak b/src/Make_cyg.mak
+--- a/src/Make_cyg.mak
++++ b/src/Make_cyg.mak
+@@ -234,18 +234,26 @@
+ ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),)
+ RUBY_PLATFORM = i386-mingw32
+ else
++ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),)
++RUBY_PLATFORM = x64-mingw32
++else
+ RUBY_PLATFORM = i386-mswin32
+ endif
+ endif
+ endif
++endif
+ 
+ ifndef RUBY_INSTALL_NAME
+ ifeq ($(RUBY_VER), 16)
+ RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
+ else
++ifeq ($(ARCH),x86-64)
++RUBY_INSTALL_NAME = x64-msvcrt-ruby$(RUBY_API_VER)
++else
+ RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
+ endif
+ endif
++endif
+ 
+ ifeq (19, $(word 1,$(sort 19 $(RUBY_VER))))
+ RUBY_19_OR_LATER = 1
+diff --git a/src/Make_ming.mak b/src/Make_ming.mak
+--- a/src/Make_ming.mak
++++ b/src/Make_ming.mak
+@@ -297,18 +297,26 @@
+ ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),)
+ RUBY_PLATFORM = i386-mingw32
+ else
++ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),)
++RUBY_PLATFORM = x64-mingw32
++else
+ RUBY_PLATFORM = i386-mswin32
+ endif
+ endif
+ endif
++endif
+ 
+ ifndef RUBY_INSTALL_NAME
+ ifeq ($(RUBY_VER), 16)
+ RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
+ else
++ifeq ($(ARCH),x86-64)
++RUBY_INSTALL_NAME = x64-msvcrt-ruby$(RUBY_API_VER)
++else
+ RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
+ endif
+ endif
++endif
+ 
+ ifeq (19, $(word 1,$(sort 19 $(RUBY_VER))))
+ RUBY_19_OR_LATER = 1
+diff --git a/src/if_ruby.c b/src/if_ruby.c
+--- a/src/if_ruby.c
++++ b/src/if_ruby.c
+@@ -39,6 +39,9 @@
+  */
+ # define rb_cFalseClass		(*dll_rb_cFalseClass)
+ # define rb_cFixnum		(*dll_rb_cFixnum)
++# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
++#  define rb_cFloat		(*dll_rb_cFloat)
++# endif
+ # define rb_cNilClass		(*dll_rb_cNilClass)
+ # define rb_cSymbol		(*dll_rb_cSymbol)
+ # define rb_cTrueClass		(*dll_rb_cTrueClass)
+@@ -249,6 +252,9 @@
+ static VALUE (*dll_rb_assoc_new) (VALUE, VALUE);
+ VALUE *dll_rb_cFalseClass;
+ VALUE *dll_rb_cFixnum;
++#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
++VALUE *dll_rb_cFloat;
++#endif
+ VALUE *dll_rb_cNilClass;
+ static VALUE *dll_rb_cObject;
+ VALUE *dll_rb_cSymbol;
+@@ -352,7 +358,7 @@
+ {
+     return dll_rb_float_new(d);
+ }
+-unsigned long rb_num2ulong(VALUE x)
++VALUE rb_num2ulong(VALUE x)
+ {
+     return (long)RSHIFT((SIGNED_VALUE)(x),1);
+ }
+@@ -373,6 +379,9 @@
+     {"rb_assoc_new", (RUBY_PROC*)&dll_rb_assoc_new},
+     {"rb_cFalseClass", (RUBY_PROC*)&dll_rb_cFalseClass},
+     {"rb_cFixnum", (RUBY_PROC*)&dll_rb_cFixnum},
++#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
++    {"rb_cFloat", (RUBY_PROC*)&dll_rb_cFloat},
++#endif
+     {"rb_cNilClass", (RUBY_PROC*)&dll_rb_cNilClass},
+     {"rb_cObject", (RUBY_PROC*)&dll_rb_cObject},
+     {"rb_cSymbol", (RUBY_PROC*)&dll_rb_cSymbol},

fix-ruby20-x64.patch

-diff --git a/src/Make_cyg.mak b/src/Make_cyg.mak
---- a/src/Make_cyg.mak
-+++ b/src/Make_cyg.mak
-@@ -234,18 +234,26 @@
- ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),)
- RUBY_PLATFORM = i386-mingw32
- else
-+ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),)
-+RUBY_PLATFORM = x64-mingw32
-+else
- RUBY_PLATFORM = i386-mswin32
- endif
- endif
- endif
-+endif
- 
- ifndef RUBY_INSTALL_NAME
- ifeq ($(RUBY_VER), 16)
- RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
- else
-+ifeq ($(ARCH),x86-64)
-+RUBY_INSTALL_NAME = x64-msvcrt-ruby$(RUBY_API_VER)
-+else
- RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
- endif
- endif
-+endif
- 
- ifeq (19, $(word 1,$(sort 19 $(RUBY_VER))))
- RUBY_19_OR_LATER = 1
-diff --git a/src/Make_ming.mak b/src/Make_ming.mak
---- a/src/Make_ming.mak
-+++ b/src/Make_ming.mak
-@@ -297,18 +297,26 @@
- ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),)
- RUBY_PLATFORM = i386-mingw32
- else
-+ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),)
-+RUBY_PLATFORM = x64-mingw32
-+else
- RUBY_PLATFORM = i386-mswin32
- endif
- endif
- endif
-+endif
- 
- ifndef RUBY_INSTALL_NAME
- ifeq ($(RUBY_VER), 16)
- RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
- else
-+ifeq ($(ARCH),x86-64)
-+RUBY_INSTALL_NAME = x64-msvcrt-ruby$(RUBY_API_VER)
-+else
- RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
- endif
- endif
-+endif
- 
- ifeq (19, $(word 1,$(sort 19 $(RUBY_VER))))
- RUBY_19_OR_LATER = 1
-diff --git a/src/if_ruby.c b/src/if_ruby.c
---- a/src/if_ruby.c
-+++ b/src/if_ruby.c
-@@ -358,7 +358,7 @@
- {
-     return dll_rb_float_new(d);
- }
--unsigned long rb_num2ulong(VALUE x)
-+VALUE rb_num2ulong(VALUE x)
- {
-     return (long)RSHIFT((SIGNED_VALUE)(x),1);
- }
 use-proto.diff
 gfw-bold-italic.patch
 cpo-N.diff
-fix-ruby20-msvc.patch
-fix-ruby20-x64.patch
+fix-ruby20-x64-and-msvc.patch