lkundrak / rpms / vim

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