jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone
3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.117
3ef2ca
Fcc: outbox
3ef2ca
From: Bram Moolenaar <Bram@moolenaar.net>
3ef2ca
Mime-Version: 1.0
3ef2ca
Content-Type: text/plain; charset=UTF-8
3ef2ca
Content-Transfer-Encoding: 8bit
3ef2ca
------------
3ef2ca
3ef2ca
Patch 7.4.117
3ef2ca
Problem:    Can't build with Cygwin/MingW and Perl 5.18.
3ef2ca
Solution:   Add a linker argument for the Perl library. (Cesar Romani)
3ef2ca
	    Adjust CFLAGS and LIB. (Cesar Romani)
3ef2ca
	    Move including inline.h further down. (Ken Takata)
3ef2ca
Files:	    src/Make_cyg.mak, src/Make_ming.mak, src/if_perl.xs
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.116/src/Make_cyg.mak	2013-11-28 16:32:34.000000000 +0100
3ef2ca
--- src/Make_cyg.mak	2013-12-11 14:59:12.000000000 +0100
3ef2ca
***************
3ef2ca
*** 1,6 ****
3ef2ca
  #
3ef2ca
  # Makefile for VIM on Win32, using Cygnus gcc
3ef2ca
! # Last updated by Dan Sharp.  Last Change: 2013 Nov 28
3ef2ca
  #
3ef2ca
  # Also read INSTALLpc.txt!
3ef2ca
  #
3ef2ca
--- 1,6 ----
3ef2ca
  #
3ef2ca
  # Makefile for VIM on Win32, using Cygnus gcc
3ef2ca
! # Last updated by Dan Sharp.  Last Change: 2013 Dec 11
3ef2ca
  #
3ef2ca
  # Also read INSTALLpc.txt!
3ef2ca
  #
3ef2ca
***************
3ef2ca
*** 155,161 ****
3ef2ca
  ifeq (yes, $(DYNAMIC_PERL))
3ef2ca
  DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
3ef2ca
  else
3ef2ca
! EXTRA_LIBS += $(PERL)/lib/CORE/perl$(PERL_VER).lib
3ef2ca
  endif
3ef2ca
  endif
3ef2ca
  
3ef2ca
--- 155,161 ----
3ef2ca
  ifeq (yes, $(DYNAMIC_PERL))
3ef2ca
  DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
3ef2ca
  else
3ef2ca
! EXTRA_LIBS += -L$(PERL)/lib/CORE -lperl$(PERL_VER)
3ef2ca
  endif
3ef2ca
  endif
3ef2ca
  
3ef2ca
*** ../vim-7.4.116/src/Make_ming.mak	2013-07-06 13:32:11.000000000 +0200
3ef2ca
--- src/Make_ming.mak	2013-12-07 20:02:52.000000000 +0100
3ef2ca
***************
3ef2ca
*** 359,364 ****
3ef2ca
--- 359,365 ----
3ef2ca
  
3ef2ca
  CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
3ef2ca
  WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
3ef2ca
+ EXTRA_LIBS =
3ef2ca
  
3ef2ca
  ifdef GETTEXT
3ef2ca
  DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
3ef2ca
***************
3ef2ca
*** 377,385 ****
3ef2ca
  endif
3ef2ca
  
3ef2ca
  ifdef PERL
3ef2ca
! CFLAGS += -I$(PERLLIBS) -DFEAT_PERL -L$(PERLLIBS)
3ef2ca
  ifeq (yes, $(DYNAMIC_PERL))
3ef2ca
  CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
3ef2ca
  endif
3ef2ca
  endif
3ef2ca
  
3ef2ca
--- 378,387 ----
3ef2ca
  endif
3ef2ca
  
3ef2ca
  ifdef PERL
3ef2ca
! CFLAGS += -I$(PERLLIBS) -DFEAT_PERL
3ef2ca
  ifeq (yes, $(DYNAMIC_PERL))
3ef2ca
  CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
3ef2ca
+ EXTRA_LIBS += -L$(PERLLIBS) -lperl$(PERL_VER)
3ef2ca
  endif
3ef2ca
  endif
3ef2ca
  
3ef2ca
***************
3ef2ca
*** 632,638 ****
3ef2ca
  
3ef2ca
  ifdef PERL
3ef2ca
  ifeq (no, $(DYNAMIC_PERL))
3ef2ca
! LIB += -lperl$(PERL_VER)
3ef2ca
  endif
3ef2ca
  endif
3ef2ca
  
3ef2ca
--- 634,640 ----
3ef2ca
  
3ef2ca
  ifdef PERL
3ef2ca
  ifeq (no, $(DYNAMIC_PERL))
3ef2ca
! LIB += -L$(PERLLIBS) -lperl$(PERL_VER)
3ef2ca
  endif
3ef2ca
  endif
3ef2ca
  
3ef2ca
*** ../vim-7.4.116/src/if_perl.xs	2013-08-02 19:28:50.000000000 +0200
3ef2ca
--- src/if_perl.xs	2013-12-11 15:02:58.000000000 +0100
3ef2ca
***************
3ef2ca
*** 14,20 ****
3ef2ca
  #define IN_PERL_FILE	/* don't include if_perl.pro from proto.h */
3ef2ca
  
3ef2ca
  /*
3ef2ca
!  * Currently 32-bit version of ActivePerl is built with VC6.
3ef2ca
   * (http://community.activestate.com/faq/windows-compilers-perl-modules)
3ef2ca
   * It means that time_t should be 32-bit. However the default size of
3ef2ca
   * time_t is 64-bit since VC8. So we have to define _USE_32BIT_TIME_T.
3ef2ca
--- 14,21 ----
3ef2ca
  #define IN_PERL_FILE	/* don't include if_perl.pro from proto.h */
3ef2ca
  
3ef2ca
  /*
3ef2ca
!  * Currently 32-bit version of ActivePerl is built with VC6 (or MinGW since
3ef2ca
!  * ActivePerl 5.18).
3ef2ca
   * (http://community.activestate.com/faq/windows-compilers-perl-modules)
3ef2ca
   * It means that time_t should be 32-bit. However the default size of
3ef2ca
   * time_t is 64-bit since VC8. So we have to define _USE_32BIT_TIME_T.
3ef2ca
***************
3ef2ca
*** 23,28 ****
3ef2ca
--- 24,45 ----
3ef2ca
  # define _USE_32BIT_TIME_T
3ef2ca
  #endif
3ef2ca
  
3ef2ca
+ /* Work around for perl-5.18.
3ef2ca
+  * Don't include "perl\lib\CORE\inline.h" for now,
3ef2ca
+  * include it after Perl_sv_free2 is defined. */
3ef2ca
+ #define PERL_NO_INLINE_FUNCTIONS
3ef2ca
+ 
3ef2ca
+ /*
3ef2ca
+  * Prevent including winsock.h.  perl.h tries to detect whether winsock.h is
3ef2ca
+  * already included before including winsock2.h, because winsock2.h isn't
3ef2ca
+  * compatible with winsock.h.  However the detection doesn't work with some
3ef2ca
+  * versions of MinGW.  If WIN32_LEAN_AND_MEAN is defined, windows.h will not
3ef2ca
+  * include winsock.h.
3ef2ca
+  */
3ef2ca
+ #ifdef WIN32
3ef2ca
+ # define WIN32_LEAN_AND_MEAN
3ef2ca
+ #endif
3ef2ca
+ 
3ef2ca
  #include "vim.h"
3ef2ca
  
3ef2ca
  #include <EXTERN.h>
3ef2ca
***************
3ef2ca
*** 81,90 ****
3ef2ca
  # define PERL5101_OR_LATER
3ef2ca
  #endif
3ef2ca
  
3ef2ca
- #if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
3ef2ca
- # define PERL5180_OR_LATER
3ef2ca
- #endif
3ef2ca
- 
3ef2ca
  #ifndef pTHX
3ef2ca
  #    define pTHX void
3ef2ca
  #    define pTHX_
3ef2ca
--- 98,103 ----
3ef2ca
***************
3ef2ca
*** 145,155 ****
3ef2ca
  # define perl_free dll_perl_free
3ef2ca
  # define Perl_get_context dll_Perl_get_context
3ef2ca
  # define Perl_croak dll_Perl_croak
3ef2ca
- # ifndef PERL5180_OR_LATER
3ef2ca
  # ifdef PERL5101_OR_LATER
3ef2ca
  #  define Perl_croak_xs_usage dll_Perl_croak_xs_usage
3ef2ca
  # endif
3ef2ca
- # endif
3ef2ca
  # ifndef PROTO
3ef2ca
  #  define Perl_croak_nocontext dll_Perl_croak_nocontext
3ef2ca
  #  define Perl_call_argv dll_Perl_call_argv
3ef2ca
--- 158,166 ----
3ef2ca
***************
3ef2ca
*** 262,271 ****
3ef2ca
  static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**);
3ef2ca
  static void* (*Perl_get_context)(void);
3ef2ca
  static void (*Perl_croak)(pTHX_ const char*, ...);
3ef2ca
- #ifndef PERL5180_OR_LATER
3ef2ca
  #ifdef PERL5101_OR_LATER
3ef2ca
  static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params);
3ef2ca
! #endif
3ef2ca
  #endif
3ef2ca
  static void (*Perl_croak_nocontext)(const char*, ...);
3ef2ca
  static I32 (*Perl_dowantarray)(pTHX);
3ef2ca
--- 273,285 ----
3ef2ca
  static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**);
3ef2ca
  static void* (*Perl_get_context)(void);
3ef2ca
  static void (*Perl_croak)(pTHX_ const char*, ...);
3ef2ca
  #ifdef PERL5101_OR_LATER
3ef2ca
+ /* Perl-5.18 has a different Perl_croak_xs_usage signature. */
3ef2ca
+ # if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
3ef2ca
+ static void (*Perl_croak_xs_usage)(const CV *const, const char *const params);
3ef2ca
+ # else
3ef2ca
  static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params);
3ef2ca
! # endif
3ef2ca
  #endif
3ef2ca
  static void (*Perl_croak_nocontext)(const char*, ...);
3ef2ca
  static I32 (*Perl_dowantarray)(pTHX);
3ef2ca
***************
3ef2ca
*** 337,343 ****
3ef2ca
--- 351,362 ----
3ef2ca
  static XPV** (*Perl_TXpv_ptr)(register PerlInterpreter*);
3ef2ca
  static STRLEN* (*Perl_Tna_ptr)(register PerlInterpreter*);
3ef2ca
  #else
3ef2ca
+ /* Perl-5.18 has a different Perl_sv_free2 signature. */
3ef2ca
+ # if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
3ef2ca
+ static void (*Perl_sv_free2)(pTHX_ SV*, const U32);
3ef2ca
+ # else
3ef2ca
  static void (*Perl_sv_free2)(pTHX_ SV*);
3ef2ca
+ # endif
3ef2ca
  static void (*Perl_sys_init)(int* argc, char*** argv);
3ef2ca
  static void (*Perl_sys_term)(void);
3ef2ca
  static void (*Perl_call_list)(pTHX_ I32, AV*);
3ef2ca
***************
3ef2ca
*** 384,394 ****
3ef2ca
      {"perl_parse", (PERL_PROC*)&perl_parse},
3ef2ca
      {"Perl_get_context", (PERL_PROC*)&Perl_get_context},
3ef2ca
      {"Perl_croak", (PERL_PROC*)&Perl_croak},
3ef2ca
- #ifndef PERL5180_OR_LATER
3ef2ca
  #ifdef PERL5101_OR_LATER
3ef2ca
      {"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage},
3ef2ca
  #endif
3ef2ca
- #endif
3ef2ca
      {"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext},
3ef2ca
      {"Perl_dowantarray", (PERL_PROC*)&Perl_dowantarray},
3ef2ca
      {"Perl_free_tmps", (PERL_PROC*)&Perl_free_tmps},
3ef2ca
--- 403,411 ----
3ef2ca
***************
3ef2ca
*** 492,497 ****
3ef2ca
--- 509,522 ----
3ef2ca
      {"", NULL},
3ef2ca
  };
3ef2ca
  
3ef2ca
+ /* Work around for perl-5.18.
3ef2ca
+  * The definitions of S_SvREFCNT_inc and S_SvREFCNT_dec are needed, so include
3ef2ca
+  * "perl\lib\CORE\inline.h", after Perl_sv_free2 is defined.
3ef2ca
+  * The linker won't complain about undefined __impl_Perl_sv_free2. */
3ef2ca
+ #if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
3ef2ca
+ # include <inline.h>
3ef2ca
+ #endif
3ef2ca
+ 
3ef2ca
  /*
3ef2ca
   * Make all runtime-links of perl.
3ef2ca
   *
3ef2ca
*** ../vim-7.4.116/src/version.c	2013-12-11 14:54:58.000000000 +0100
3ef2ca
--- src/version.c	2013-12-11 15:00:12.000000000 +0100
3ef2ca
***************
3ef2ca
*** 740,741 ****
3ef2ca
--- 740,743 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     117,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
Despite the cost of living, have you noticed how it remains so popular?
3ef2ca
3ef2ca
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3ef2ca
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3ef2ca
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
3ef2ca
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///