To: vim_dev@googlegroups.com
Subject: Patch 7.3.974
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.974
Problem:    Can't build with ruby 1.8.5.
Solution:   Only use ruby_init_stack() when RUBY_INIT_STACK is defined.
	    (Yukihiro Nakadaira)
Files:	    src/if_ruby.c


*** ../vim-7.3.973/src/if_ruby.c	2013-05-12 14:10:41.000000000 +0200
--- src/if_ruby.c	2013-05-20 12:47:48.000000000 +0200
***************
*** 158,165 ****
  static void ruby_io_init(void);
  static void ruby_vim_init(void);
  
! #if defined(__ia64) && !defined(ruby_init_stack)
! # define ruby_init_stack(addr) ruby_init_stack((addr), rb_ia64_bsp())
  #endif
  
  #if defined(DYNAMIC_RUBY) || defined(PROTO)
--- 158,167 ----
  static void ruby_io_init(void);
  static void ruby_vim_init(void);
  
! #if defined(RUBY19_OR_LATER) || defined(RUBY_INIT_STACK)
! # if defined(__ia64) && !defined(ruby_init_stack)
! #  define ruby_init_stack(addr) ruby_init_stack((addr), rb_ia64_bsp())
! # endif
  #endif
  
  #if defined(DYNAMIC_RUBY) || defined(PROTO)
***************
*** 231,242 ****
  #  define rb_float_new			dll_rb_float_new
  #  define rb_ary_new			dll_rb_ary_new
  #  define rb_ary_push			dll_rb_ary_push
! #  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
--- 233,246 ----
  #  define rb_float_new			dll_rb_float_new
  #  define rb_ary_new			dll_rb_ary_new
  #  define rb_ary_push			dll_rb_ary_push
! #  if defined(RUBY19_OR_LATER) || defined(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
  #  endif
  # else
  #  define rb_str2cstr			dll_rb_str2cstr
***************
*** 346,356 ****
  static VALUE (*dll_rb_float_new) (double);
  static VALUE (*dll_rb_ary_new) (void);
  static VALUE (*dll_rb_ary_push) (VALUE, 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
--- 350,362 ----
  static VALUE (*dll_rb_float_new) (double);
  static VALUE (*dll_rb_ary_new) (void);
  static VALUE (*dll_rb_ary_push) (VALUE, VALUE);
! #  if defined(RUBY19_OR_LATER) || defined(RUBY_INIT_STACK)
! #   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
  # endif
  # ifdef RUBY19_OR_LATER
***************
*** 491,500 ****
  # 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},
  #  else
--- 497,502 ----
***************
*** 513,518 ****
--- 515,526 ----
      {"rb_require", (RUBY_PROC*)&dll_rb_require},
      {"ruby_process_options", (RUBY_PROC*)&dll_ruby_process_options},
  # endif
+ # if defined(RUBY19_OR_LATER) || defined(RUBY_INIT_STACK)
+ #  ifdef __ia64
+     {"rb_ia64_bsp", (RUBY_PROC*)&dll_rb_ia64_bsp},
+ #  endif
+     {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack},
+ # endif
      {"", NULL},
  };
  
***************
*** 735,741 ****
  	    NtInitialize(&argc, &argv);
  #endif
  	    {
! #if defined(RUBY_VERSION) && RUBY_VERSION >= 18
  		ruby_init_stack(ruby_stack_start);
  #endif
  		ruby_init();
--- 743,749 ----
  	    NtInitialize(&argc, &argv);
  #endif
  	    {
! #if defined(RUBY19_OR_LATER) || defined(RUBY_INIT_STACK)
  		ruby_init_stack(ruby_stack_start);
  #endif
  		ruby_init();
*** ../vim-7.3.973/src/version.c	2013-05-19 22:31:13.000000000 +0200
--- src/version.c	2013-05-20 12:51:22.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
  {   /* Add new patch number below this line */
+ /**/
+     974,
  /**/

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
