jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.117

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