summaryrefslogtreecommitdiffstats
path: root/patches/source/vim/patches/7.4.117
blob: 5fb026891f6d4add7dc2fade709125fe4dcfb434 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
To: vim_dev@googlegroups.com
Subject: Patch 7.4.117
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.4.117
Problem:    Can't build with Cygwin/MingW and Perl 5.18.
Solution:   Add a linker argument for the Perl library. (Cesar Romani)
	    Adjust CFLAGS and LIB. (Cesar Romani)
	    Move including inline.h further down. (Ken Takata)
Files:	    src/Make_cyg.mak, src/Make_ming.mak, src/if_perl.xs


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

-- 
Despite the cost of living, have you noticed how it remains so popular?

 /// Bram Moolenaar -- Bram@Moolenaar.net -- 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    ///