home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.117 < prev    next >
Encoding:
Internet Message Format  |  2013-12-10  |  7.9 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.117
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.117
  11. Problem:    Can't build with Cygwin/MingW and Perl 5.18.
  12. Solution:   Add a linker argument for the Perl library. (Cesar Romani)
  13.         Adjust CFLAGS and LIB. (Cesar Romani)
  14.         Move including inline.h further down. (Ken Takata)
  15. Files:        src/Make_cyg.mak, src/Make_ming.mak, src/if_perl.xs
  16.  
  17.  
  18. *** ../vim-7.4.116/src/Make_cyg.mak    2013-11-28 16:32:34.000000000 +0100
  19. --- src/Make_cyg.mak    2013-12-11 14:59:12.000000000 +0100
  20. ***************
  21. *** 1,6 ****
  22.   #
  23.   # Makefile for VIM on Win32, using Cygnus gcc
  24. ! # Last updated by Dan Sharp.  Last Change: 2013 Nov 28
  25.   #
  26.   # Also read INSTALLpc.txt!
  27.   #
  28. --- 1,6 ----
  29.   #
  30.   # Makefile for VIM on Win32, using Cygnus gcc
  31. ! # Last updated by Dan Sharp.  Last Change: 2013 Dec 11
  32.   #
  33.   # Also read INSTALLpc.txt!
  34.   #
  35. ***************
  36. *** 155,161 ****
  37.   ifeq (yes, $(DYNAMIC_PERL))
  38.   DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
  39.   else
  40. ! EXTRA_LIBS += $(PERL)/lib/CORE/perl$(PERL_VER).lib
  41.   endif
  42.   endif
  43.   
  44. --- 155,161 ----
  45.   ifeq (yes, $(DYNAMIC_PERL))
  46.   DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
  47.   else
  48. ! EXTRA_LIBS += -L$(PERL)/lib/CORE -lperl$(PERL_VER)
  49.   endif
  50.   endif
  51.   
  52. *** ../vim-7.4.116/src/Make_ming.mak    2013-07-06 13:32:11.000000000 +0200
  53. --- src/Make_ming.mak    2013-12-07 20:02:52.000000000 +0100
  54. ***************
  55. *** 359,364 ****
  56. --- 359,365 ----
  57.   
  58.   CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
  59.   WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
  60. + EXTRA_LIBS =
  61.   
  62.   ifdef GETTEXT
  63.   DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
  64. ***************
  65. *** 377,385 ****
  66.   endif
  67.   
  68.   ifdef PERL
  69. ! CFLAGS += -I$(PERLLIBS) -DFEAT_PERL -L$(PERLLIBS)
  70.   ifeq (yes, $(DYNAMIC_PERL))
  71.   CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
  72.   endif
  73.   endif
  74.   
  75. --- 378,387 ----
  76.   endif
  77.   
  78.   ifdef PERL
  79. ! CFLAGS += -I$(PERLLIBS) -DFEAT_PERL
  80.   ifeq (yes, $(DYNAMIC_PERL))
  81.   CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
  82. + EXTRA_LIBS += -L$(PERLLIBS) -lperl$(PERL_VER)
  83.   endif
  84.   endif
  85.   
  86. ***************
  87. *** 632,638 ****
  88.   
  89.   ifdef PERL
  90.   ifeq (no, $(DYNAMIC_PERL))
  91. ! LIB += -lperl$(PERL_VER)
  92.   endif
  93.   endif
  94.   
  95. --- 634,640 ----
  96.   
  97.   ifdef PERL
  98.   ifeq (no, $(DYNAMIC_PERL))
  99. ! LIB += -L$(PERLLIBS) -lperl$(PERL_VER)
  100.   endif
  101.   endif
  102.   
  103. *** ../vim-7.4.116/src/if_perl.xs    2013-08-02 19:28:50.000000000 +0200
  104. --- src/if_perl.xs    2013-12-11 15:02:58.000000000 +0100
  105. ***************
  106. *** 14,20 ****
  107.   #define IN_PERL_FILE    /* don't include if_perl.pro from proto.h */
  108.   
  109.   /*
  110. !  * Currently 32-bit version of ActivePerl is built with VC6.
  111.    * (http://community.activestate.com/faq/windows-compilers-perl-modules)
  112.    * It means that time_t should be 32-bit. However the default size of
  113.    * time_t is 64-bit since VC8. So we have to define _USE_32BIT_TIME_T.
  114. --- 14,21 ----
  115.   #define IN_PERL_FILE    /* don't include if_perl.pro from proto.h */
  116.   
  117.   /*
  118. !  * Currently 32-bit version of ActivePerl is built with VC6 (or MinGW since
  119. !  * ActivePerl 5.18).
  120.    * (http://community.activestate.com/faq/windows-compilers-perl-modules)
  121.    * It means that time_t should be 32-bit. However the default size of
  122.    * time_t is 64-bit since VC8. So we have to define _USE_32BIT_TIME_T.
  123. ***************
  124. *** 23,28 ****
  125. --- 24,45 ----
  126.   # define _USE_32BIT_TIME_T
  127.   #endif
  128.   
  129. + /* Work around for perl-5.18.
  130. +  * Don't include "perl\lib\CORE\inline.h" for now,
  131. +  * include it after Perl_sv_free2 is defined. */
  132. + #define PERL_NO_INLINE_FUNCTIONS
  133. + /*
  134. +  * Prevent including winsock.h.  perl.h tries to detect whether winsock.h is
  135. +  * already included before including winsock2.h, because winsock2.h isn't
  136. +  * compatible with winsock.h.  However the detection doesn't work with some
  137. +  * versions of MinGW.  If WIN32_LEAN_AND_MEAN is defined, windows.h will not
  138. +  * include winsock.h.
  139. +  */
  140. + #ifdef WIN32
  141. + # define WIN32_LEAN_AND_MEAN
  142. + #endif
  143.   #include "vim.h"
  144.   
  145.   #include <EXTERN.h>
  146. ***************
  147. *** 81,90 ****
  148.   # define PERL5101_OR_LATER
  149.   #endif
  150.   
  151. - #if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
  152. - # define PERL5180_OR_LATER
  153. - #endif
  154.   #ifndef pTHX
  155.   #    define pTHX void
  156.   #    define pTHX_
  157. --- 98,103 ----
  158. ***************
  159. *** 145,155 ****
  160.   # define perl_free dll_perl_free
  161.   # define Perl_get_context dll_Perl_get_context
  162.   # define Perl_croak dll_Perl_croak
  163. - # ifndef PERL5180_OR_LATER
  164.   # ifdef PERL5101_OR_LATER
  165.   #  define Perl_croak_xs_usage dll_Perl_croak_xs_usage
  166.   # endif
  167. - # endif
  168.   # ifndef PROTO
  169.   #  define Perl_croak_nocontext dll_Perl_croak_nocontext
  170.   #  define Perl_call_argv dll_Perl_call_argv
  171. --- 158,166 ----
  172. ***************
  173. *** 262,271 ****
  174.   static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**);
  175.   static void* (*Perl_get_context)(void);
  176.   static void (*Perl_croak)(pTHX_ const char*, ...);
  177. - #ifndef PERL5180_OR_LATER
  178.   #ifdef PERL5101_OR_LATER
  179.   static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params);
  180. ! #endif
  181.   #endif
  182.   static void (*Perl_croak_nocontext)(const char*, ...);
  183.   static I32 (*Perl_dowantarray)(pTHX);
  184. --- 273,285 ----
  185.   static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**);
  186.   static void* (*Perl_get_context)(void);
  187.   static void (*Perl_croak)(pTHX_ const char*, ...);
  188.   #ifdef PERL5101_OR_LATER
  189. + /* Perl-5.18 has a different Perl_croak_xs_usage signature. */
  190. + # if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
  191. + static void (*Perl_croak_xs_usage)(const CV *const, const char *const params);
  192. + # else
  193.   static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params);
  194. ! # endif
  195.   #endif
  196.   static void (*Perl_croak_nocontext)(const char*, ...);
  197.   static I32 (*Perl_dowantarray)(pTHX);
  198. ***************
  199. *** 337,343 ****
  200. --- 351,362 ----
  201.   static XPV** (*Perl_TXpv_ptr)(register PerlInterpreter*);
  202.   static STRLEN* (*Perl_Tna_ptr)(register PerlInterpreter*);
  203.   #else
  204. + /* Perl-5.18 has a different Perl_sv_free2 signature. */
  205. + # if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
  206. + static void (*Perl_sv_free2)(pTHX_ SV*, const U32);
  207. + # else
  208.   static void (*Perl_sv_free2)(pTHX_ SV*);
  209. + # endif
  210.   static void (*Perl_sys_init)(int* argc, char*** argv);
  211.   static void (*Perl_sys_term)(void);
  212.   static void (*Perl_call_list)(pTHX_ I32, AV*);
  213. ***************
  214. *** 384,394 ****
  215.       {"perl_parse", (PERL_PROC*)&perl_parse},
  216.       {"Perl_get_context", (PERL_PROC*)&Perl_get_context},
  217.       {"Perl_croak", (PERL_PROC*)&Perl_croak},
  218. - #ifndef PERL5180_OR_LATER
  219.   #ifdef PERL5101_OR_LATER
  220.       {"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage},
  221.   #endif
  222. - #endif
  223.       {"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext},
  224.       {"Perl_dowantarray", (PERL_PROC*)&Perl_dowantarray},
  225.       {"Perl_free_tmps", (PERL_PROC*)&Perl_free_tmps},
  226. --- 403,411 ----
  227. ***************
  228. *** 492,497 ****
  229. --- 509,522 ----
  230.       {"", NULL},
  231.   };
  232.   
  233. + /* Work around for perl-5.18.
  234. +  * The definitions of S_SvREFCNT_inc and S_SvREFCNT_dec are needed, so include
  235. +  * "perl\lib\CORE\inline.h", after Perl_sv_free2 is defined.
  236. +  * The linker won't complain about undefined __impl_Perl_sv_free2. */
  237. + #if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
  238. + # include <inline.h>
  239. + #endif
  240.   /*
  241.    * Make all runtime-links of perl.
  242.    *
  243. *** ../vim-7.4.116/src/version.c    2013-12-11 14:54:58.000000000 +0100
  244. --- src/version.c    2013-12-11 15:00:12.000000000 +0100
  245. ***************
  246. *** 740,741 ****
  247. --- 740,743 ----
  248.   {   /* Add new patch number below this line */
  249. + /**/
  250. +     117,
  251.   /**/
  252.  
  253. -- 
  254. Despite the cost of living, have you noticed how it remains so popular?
  255.  
  256.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  257. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  258. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  259.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  260.