changeset 4373:c42e130ebf36 v7.3.935

updated for version 7.3.935 Problem: Init stack works differently on 64 bit systems. Solution: Handle 64 bit systems and also static library. (Yukihiro Nakadaira)
author Bram Moolenaar <bram@vim.org>
date Sat, 11 May 2013 17:45:48 +0200
parents 05c4309e639e
children 94d3350638b4
files src/if_ruby.c src/version.c
diffstat 2 files changed, 19 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -227,7 +227,13 @@ static void ruby_vim_init(void);
 # define rb_float_new			dll_rb_float_new
 # define rb_ary_new			dll_rb_ary_new
 # define rb_ary_push			dll_rb_ary_push
-# define ruby_init_stack		dll_ruby_init_stack
+# ifdef __ia64
+#  define rb_ia64_bsp		dll_rb_ia64_bsp
+#  undef ruby_init_stack
+#  define ruby_init_stack(addr)	dll_ruby_init_stack((addr), rb_ia64_bsp())
+# else
+#  define ruby_init_stack	dll_ruby_init_stack
+# endif
 #else
 # define rb_str2cstr			dll_rb_str2cstr
 #endif
@@ -336,7 +342,12 @@ static char * (*dll_rb_string_value_ptr)
 static VALUE (*dll_rb_float_new) (double);
 static VALUE (*dll_rb_ary_new) (void);
 static VALUE (*dll_rb_ary_push) (VALUE, VALUE);
-static void (*ruby_init_stack)(VALUE*);
+# ifdef __ia64
+static void * (*dll_rb_ia64_bsp) (void);
+static void (*dll_ruby_init_stack)(VALUE*, void*);
+# else
+static void (*dll_ruby_init_stack)(VALUE*);
+# endif
 #endif
 #ifdef RUBY19_OR_LATER
 static VALUE (*dll_rb_int2big)(SIGNED_VALUE);
@@ -476,6 +487,9 @@ static struct
 #endif
 #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
     {"rb_string_value_ptr", (RUBY_PROC*)&dll_rb_string_value_ptr},
+# ifdef __ia64
+    {"rb_ia64_bsp", (RUBY_PROC*)&dll_rb_ia64_bsp},
+# endif
     {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack},
 # if DYNAMIC_RUBY_VER <= 19
     {"rb_float_new", (RUBY_PROC*)&dll_rb_float_new},
@@ -717,7 +731,7 @@ static int ensure_ruby_initialized(void)
 	    NtInitialize(&argc, &argv);
 #endif
 	    {
-#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
+#if defined(RUBY_VERSION) && RUBY_VERSION >= 18
 		ruby_init_stack(ruby_stack_start);
 #endif
 		ruby_init();
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    935,
+/**/
     934,
 /**/
     933,