Patch 8.2.2104
Problem:    Build problem with Ruby 2.7.
Solution:   Adjust function declarations. (Ozaki Kiichi, closes #7430)
Files:      src/configure.ac, src/auto/configure, src/if_ruby.c


*** ../vim-8.2.2103/src/configure.ac    2020-12-04 18:09:50.644966602 +0100
--- src/configure.ac    2020-12-06 20:59:32.741021110 +0100
***************
*** 1965,1972 ****
        librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print 
$ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['LIBRUBYARG']])"`
        librubya=`$vi_cv_path_ruby -r rbconfig -e "print 
$ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['LIBRUBY_A']])"`
        rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print 
$ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['libdir']])"`
!       if test -f "$rubylibdir/$librubya"; then
!         librubyarg="$librubyarg"
          RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
        elif test "$librubyarg" = "libruby.a"; then
          dnl required on Mac OS 10.3 where libruby.a doesn't exist
--- 1965,1971 ----
        librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print 
$ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['LIBRUBYARG']])"`
        librubya=`$vi_cv_path_ruby -r rbconfig -e "print 
$ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['LIBRUBY_A']])"`
        rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print 
$ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['libdir']])"`
!       if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby"; 
then
          RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
        elif test "$librubyarg" = "libruby.a"; then
          dnl required on Mac OS 10.3 where libruby.a doesn't exist
*** ../vim-8.2.2103/src/auto/configure  2020-12-04 18:09:50.648966590 +0100
--- src/auto/configure  2020-12-06 21:01:45.148635207 +0100
***************
*** 7617,7624 ****
        librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print 
$ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
        librubya=`$vi_cv_path_ruby -r rbconfig -e "print 
$ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
        rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print 
$ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
!       if test -f "$rubylibdir/$librubya"; then
!         librubyarg="$librubyarg"
          RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
        elif test "$librubyarg" = "libruby.a"; then
                  librubyarg="-lruby"
--- 7617,7623 ----
        librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print 
$ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
        librubya=`$vi_cv_path_ruby -r rbconfig -e "print 
$ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
        rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print 
$ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
!       if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby"; 
then
          RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
        elif test "$librubyarg" = "libruby.a"; then
                  librubyarg="-lruby"
*** ../vim-8.2.2103/src/if_ruby.c       2020-06-12 22:59:07.266097201 +0200
--- src/if_ruby.c       2020-12-06 20:59:32.741021110 +0100
***************
*** 1300,1312 ****
  }
  
      static VALUE
! buffer_s_current(void)
  {
      return buffer_new(curbuf);
  }
  
      static VALUE
! buffer_s_count(void)
  {
      buf_T *b;
      int n = 0;
--- 1300,1318 ----
  }
  
      static VALUE
! buffer_s_current(VALUE self UNUSED)
  {
      return buffer_new(curbuf);
  }
  
      static VALUE
! buffer_s_current_getter(ID id UNUSED, VALUE *x UNUSED)
! {
!     return buffer_new(curbuf);
! }
! 
!     static VALUE
! buffer_s_count(VALUE self UNUSED)
  {
      buf_T *b;
      int n = 0;
***************
*** 1566,1572 ****
  }
  
      static VALUE
! window_s_current(void)
  {
      return window_new(curwin);
  }
--- 1572,1584 ----
  }
  
      static VALUE
! window_s_current(VALUE self UNUSED)
! {
!     return window_new(curwin);
! }
! 
!     static VALUE
! window_s_current_getter(ID id UNUSED, VALUE *x UNUSED)
  {
      return window_new(curwin);
  }
***************
*** 1576,1582 ****
   *    SegPhault - 03/07/05
   */
      static VALUE
! line_s_current(void)
  {
      return get_buffer_line(curbuf, curwin->w_cursor.lnum);
  }
--- 1588,1594 ----
   *    SegPhault - 03/07/05
   */
      static VALUE
! line_s_current(VALUE self UNUSED)
  {
      return get_buffer_line(curbuf, curwin->w_cursor.lnum);
  }
***************
*** 1588,1600 ****
  }
  
      static VALUE
! current_line_number(void)
  {
      return INT2FIX((int)curwin->w_cursor.lnum);
  }
  
      static VALUE
! window_s_count(void)
  {
      win_T     *w;
      int n = 0;
--- 1600,1612 ----
  }
  
      static VALUE
! current_line_number(VALUE self UNUSED)
  {
      return INT2FIX((int)curwin->w_cursor.lnum);
  }
  
      static VALUE
! window_s_count(VALUE self UNUSED)
  {
      win_T     *w;
      int n = 0;
***************
*** 1794,1801 ****
      rb_define_method(cVimWindow, "cursor", window_cursor, 0);
      rb_define_method(cVimWindow, "cursor=", window_set_cursor, 1);
  
!     rb_define_virtual_variable("$curbuf", buffer_s_current, 0);
!     rb_define_virtual_variable("$curwin", window_s_current, 0);
  }
  
      void
--- 1806,1813 ----
      rb_define_method(cVimWindow, "cursor", window_cursor, 0);
      rb_define_method(cVimWindow, "cursor=", window_set_cursor, 1);
  
!     rb_define_virtual_variable("$curbuf", buffer_s_current_getter, 0);
!     rb_define_virtual_variable("$curwin", window_s_current_getter, 0);
  }
  
      void
*** ../vim-8.2.2103/src/version.c       2020-12-06 20:12:39.754611585 +0100
--- src/version.c       2020-12-06 21:01:03.508761941 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2104,
  /**/

-- 
Shaw's Principle: Build a system that even a fool can use, and
only a fool will want to use it.

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202012062012.0B6KC0Mw1178533%40masaka.moolenaar.net.

Raspunde prin e-mail lui