0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

updated for version 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)
This commit is contained in:
Bram Moolenaar
2013-12-11 15:06:40 +01:00
parent 7ba0741451
commit 6b10721fa2
4 changed files with 44 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
# #
# Makefile for VIM on Win32, using Cygnus gcc # Makefile for VIM on Win32, using Cygnus gcc
# Last updated by Dan Sharp. Last Change: 2013 Nov 28 # Last updated by Dan Sharp. Last Change: 2013 Dec 11
# #
# Also read INSTALLpc.txt! # Also read INSTALLpc.txt!
# #
@@ -155,7 +155,7 @@ endif
ifeq (yes, $(DYNAMIC_PERL)) ifeq (yes, $(DYNAMIC_PERL))
DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\" DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
else else
EXTRA_LIBS += $(PERL)/lib/CORE/perl$(PERL_VER).lib EXTRA_LIBS += -L$(PERL)/lib/CORE -lperl$(PERL_VER)
endif endif
endif endif

View File

@@ -359,6 +359,7 @@ WINDRES_CC = $(CC)
CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
EXTRA_LIBS =
ifdef GETTEXT ifdef GETTEXT
DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
@@ -377,9 +378,10 @@ endif
endif endif
ifdef PERL ifdef PERL
CFLAGS += -I$(PERLLIBS) -DFEAT_PERL -L$(PERLLIBS) CFLAGS += -I$(PERLLIBS) -DFEAT_PERL
ifeq (yes, $(DYNAMIC_PERL)) ifeq (yes, $(DYNAMIC_PERL))
CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\" CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
EXTRA_LIBS += -L$(PERLLIBS) -lperl$(PERL_VER)
endif endif
endif endif
@@ -632,7 +634,7 @@ endif
ifdef PERL ifdef PERL
ifeq (no, $(DYNAMIC_PERL)) ifeq (no, $(DYNAMIC_PERL))
LIB += -lperl$(PERL_VER) LIB += -L$(PERLLIBS) -lperl$(PERL_VER)
endif endif
endif endif

View File

@@ -14,7 +14,8 @@
#define IN_PERL_FILE /* don't include if_perl.pro from proto.h */ #define IN_PERL_FILE /* don't include if_perl.pro from proto.h */
/* /*
* Currently 32-bit version of ActivePerl is built with VC6. * 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) * (http://community.activestate.com/faq/windows-compilers-perl-modules)
* It means that time_t should be 32-bit. However the default size of * 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. * time_t is 64-bit since VC8. So we have to define _USE_32BIT_TIME_T.
@@ -23,6 +24,22 @@
# define _USE_32BIT_TIME_T # define _USE_32BIT_TIME_T
#endif #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 "vim.h"
#include <EXTERN.h> #include <EXTERN.h>
@@ -81,10 +98,6 @@
# define PERL5101_OR_LATER # define PERL5101_OR_LATER
#endif #endif
#if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
# define PERL5180_OR_LATER
#endif
#ifndef pTHX #ifndef pTHX
# define pTHX void # define pTHX void
# define pTHX_ # define pTHX_
@@ -145,11 +158,9 @@ typedef int perl_key;
# define perl_free dll_perl_free # define perl_free dll_perl_free
# define Perl_get_context dll_Perl_get_context # define Perl_get_context dll_Perl_get_context
# define Perl_croak dll_Perl_croak # define Perl_croak dll_Perl_croak
# ifndef PERL5180_OR_LATER
# ifdef PERL5101_OR_LATER # ifdef PERL5101_OR_LATER
# define Perl_croak_xs_usage dll_Perl_croak_xs_usage # define Perl_croak_xs_usage dll_Perl_croak_xs_usage
# endif # endif
# endif
# ifndef PROTO # ifndef PROTO
# define Perl_croak_nocontext dll_Perl_croak_nocontext # define Perl_croak_nocontext dll_Perl_croak_nocontext
# define Perl_call_argv dll_Perl_call_argv # define Perl_call_argv dll_Perl_call_argv
@@ -262,10 +273,13 @@ static int (*perl_run)(PerlInterpreter*);
static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**); static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**);
static void* (*Perl_get_context)(void); static void* (*Perl_get_context)(void);
static void (*Perl_croak)(pTHX_ const char*, ...); static void (*Perl_croak)(pTHX_ const char*, ...);
#ifndef PERL5180_OR_LATER
#ifdef PERL5101_OR_LATER #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); static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const params);
#endif # endif
#endif #endif
static void (*Perl_croak_nocontext)(const char*, ...); static void (*Perl_croak_nocontext)(const char*, ...);
static I32 (*Perl_dowantarray)(pTHX); static I32 (*Perl_dowantarray)(pTHX);
@@ -337,7 +351,12 @@ static SV** (*Perl_TSv_ptr)(register PerlInterpreter*);
static XPV** (*Perl_TXpv_ptr)(register PerlInterpreter*); static XPV** (*Perl_TXpv_ptr)(register PerlInterpreter*);
static STRLEN* (*Perl_Tna_ptr)(register PerlInterpreter*); static STRLEN* (*Perl_Tna_ptr)(register PerlInterpreter*);
#else #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*); static void (*Perl_sv_free2)(pTHX_ SV*);
# endif
static void (*Perl_sys_init)(int* argc, char*** argv); static void (*Perl_sys_init)(int* argc, char*** argv);
static void (*Perl_sys_term)(void); static void (*Perl_sys_term)(void);
static void (*Perl_call_list)(pTHX_ I32, AV*); static void (*Perl_call_list)(pTHX_ I32, AV*);
@@ -384,10 +403,8 @@ static struct {
{"perl_parse", (PERL_PROC*)&perl_parse}, {"perl_parse", (PERL_PROC*)&perl_parse},
{"Perl_get_context", (PERL_PROC*)&Perl_get_context}, {"Perl_get_context", (PERL_PROC*)&Perl_get_context},
{"Perl_croak", (PERL_PROC*)&Perl_croak}, {"Perl_croak", (PERL_PROC*)&Perl_croak},
#ifndef PERL5180_OR_LATER
#ifdef PERL5101_OR_LATER #ifdef PERL5101_OR_LATER
{"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage}, {"Perl_croak_xs_usage", (PERL_PROC*)&Perl_croak_xs_usage},
#endif
#endif #endif
{"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext}, {"Perl_croak_nocontext", (PERL_PROC*)&Perl_croak_nocontext},
{"Perl_dowantarray", (PERL_PROC*)&Perl_dowantarray}, {"Perl_dowantarray", (PERL_PROC*)&Perl_dowantarray},
@@ -492,6 +509,14 @@ static struct {
{"", NULL}, {"", 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. * Make all runtime-links of perl.
* *

View File

@@ -738,6 +738,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
117,
/**/ /**/
116, 116,
/**/ /**/