To: vim-dev@vim.org Subject: Patch 6.1.332 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.332 (extra) Problem: Win32: Loading Perl dynamically doesn't work with Perl 5.8. Perl 5.8 also does not work with Cygwin and Ming. Solution: Adjust the function calls. (Taro Muraoka) Adjust the cyg and ming makefiles. (Dan Sharp) Files: src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak, src/if_perl.xs *** ../vim61.331/src/Make_cyg.mak Sun Jan 19 16:13:04 2003 --- src/Make_cyg.mak Mon Feb 3 20:15:42 2003 *************** *** 81,87 **** DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\" endif INCLUDES += -I$(PERL)/lib/CORE ! EXTRA_LIBS += $(PERL)/lib/CORE/perl56.lib endif ############################## --- 81,87 ---- DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\" endif INCLUDES += -I$(PERL)/lib/CORE ! EXTRA_LIBS += $(PERL)/lib/CORE/perl$(PERL_VER).lib endif ############################## *************** *** 348,355 **** $(CC) -c $(CFLAGS) -D__IID_DEFINED__ if_ole.cpp -o $(OUTDIR)/if_ole.o if_perl.c: if_perl.xs typemap ! perl /usr/lib/perl5/5.6.1/ExtUtils/xsubpp -prototypes -typemap \ ! /usr/lib/perl5/5.6.1/ExtUtils/typemap if_perl.xs > $@ $(OUTDIR)/if_perl.o: if_perl.c $(INCL) dyn-ming.h ifeq (no, $(USEDLL)) --- 348,355 ---- $(CC) -c $(CFLAGS) -D__IID_DEFINED__ if_ole.cpp -o $(OUTDIR)/if_ole.o if_perl.c: if_perl.xs typemap ! perl $(PERL)/lib/ExtUtils/xsubpp -prototypes -typemap \ ! $(PERL)/lib/ExtUtils/typemap if_perl.xs > $@ $(OUTDIR)/if_perl.o: if_perl.c $(INCL) dyn-ming.h ifeq (no, $(USEDLL)) *** ../vim61.331/src/Make_ming.mak Tue Jan 28 21:38:14 2003 --- src/Make_ming.mak Mon Feb 3 20:17:20 2003 *************** *** 16,22 **** # # "make upx" makes *compressed* versions of the GUI and console EXEs, using the # excellent UPX compressor: ! # http://upx.tsx.org/ # # Maintained by Ron Aaron # updated 2003 Jan 20 --- 16,22 ---- # # "make upx" makes *compressed* versions of the GUI and console EXEs, using the # excellent UPX compressor: ! # http://upx.sourceforge.net/ # # Maintained by Ron Aaron # updated 2003 Jan 20 *************** *** 72,78 **** # uncomment 'PERL' if you want a perl-enabled version #PERL=perl ! DYNAMIC_PERL=perl56.dll # on Linux, for cross-compile, it's here: #PERLLIB=/home/ron/ActivePerl/lib # on NT, it's here: --- 72,83 ---- # uncomment 'PERL' if you want a perl-enabled version #PERL=perl ! ifdef PERL ! ifndef PERL_VER ! PERL_VER=56 ! endif ! endif ! DYNAMIC_PERL=perl$(PERL_VER).dll # on Linux, for cross-compile, it's here: #PERLLIB=/home/ron/ActivePerl/lib # on NT, it's here: *** ../vim61.331/src/Make_mvc.mak Sun Jan 19 16:13:04 2003 --- src/Make_mvc.mak Sat Feb 1 12:33:33 2003 *************** *** 403,409 **** !ifdef PERL !message Perl requested (version $(PERL_VER)) - root dir is "$(PERL)" !if "$(DYNAMIC_PERL)" == "yes" ! !if "$(PERL_VER)" == "56" !message Perl DLL will be loaded dynamically !else !message Dynamic loading is not supported for Perl versions earlier than 5.6.0 --- 403,409 ---- !ifdef PERL !message Perl requested (version $(PERL_VER)) - root dir is "$(PERL)" !if "$(DYNAMIC_PERL)" == "yes" ! !if "$(PERL_VER)" >= "56" !message Perl DLL will be loaded dynamically !else !message Dynamic loading is not supported for Perl versions earlier than 5.6.0 *** ../vim61.331/src/if_perl.xs Tue Nov 19 12:02:53 2002 --- src/if_perl.xs Mon Feb 3 20:19:40 2003 *************** *** 24,30 **** #undef OP_DELETE #undef OP_JOIN #ifdef __BORLANDC__ ! #define NOPROTO 1 #endif /* remove MAX and MIN, included by glib.h, redefined by sys/param.h */ #ifdef MAX --- 24,30 ---- #undef OP_DELETE #undef OP_JOIN #ifdef __BORLANDC__ ! # define NOPROTO 1 #endif /* remove MAX and MIN, included by glib.h, redefined by sys/param.h */ #ifdef MAX *************** *** 44,49 **** --- 44,54 ---- # undef _DEBUG #endif + #ifdef __BORLANDC__ + /* Borland has the structure stati64 but not _stati64 */ + # define _stati64 stati64 + #endif + /* OK, nasty namespace hacking over... */ #include *************** *** 133,148 **** # define Perl_sv_2bool dll_Perl_sv_2bool # define Perl_sv_2iv dll_Perl_sv_2iv # define Perl_sv_2mortal dll_Perl_sv_2mortal ! # define Perl_sv_2pv dll_Perl_sv_2pv # define Perl_sv_bless dll_Perl_sv_bless ! # define Perl_sv_catpvn dll_Perl_sv_catpvn # define Perl_sv_free dll_Perl_sv_free # define Perl_sv_isa dll_Perl_sv_isa # define Perl_sv_magic dll_Perl_sv_magic # define Perl_sv_setiv dll_Perl_sv_setiv # define Perl_sv_setpv dll_Perl_sv_setpv # define Perl_sv_setpvn dll_Perl_sv_setpvn ! # define Perl_sv_setsv dll_Perl_sv_setsv # define Perl_sv_upgrade dll_Perl_sv_upgrade # define Perl_Tstack_sp_ptr dll_Perl_Tstack_sp_ptr # define Perl_Top_ptr dll_Perl_Top_ptr --- 138,166 ---- # define Perl_sv_2bool dll_Perl_sv_2bool # define Perl_sv_2iv dll_Perl_sv_2iv # define Perl_sv_2mortal dll_Perl_sv_2mortal ! # if PERL_REVISION == 5 && PERL_VERSION >= 8 ! # define Perl_sv_2pv_flags dll_Perl_sv_2pv_flags ! # define Perl_sv_2pv_nolen dll_Perl_sv_2pv_nolen ! # else ! # define Perl_sv_2pv dll_Perl_sv_2pv ! # endif # define Perl_sv_bless dll_Perl_sv_bless ! # if PERL_REVISION == 5 && PERL_VERSION >= 8 ! # define Perl_sv_catpvn_flags dll_Perl_sv_catpvn_flags ! # else ! # define Perl_sv_catpvn dll_Perl_sv_catpvn ! # endif # define Perl_sv_free dll_Perl_sv_free # define Perl_sv_isa dll_Perl_sv_isa # define Perl_sv_magic dll_Perl_sv_magic # define Perl_sv_setiv dll_Perl_sv_setiv # define Perl_sv_setpv dll_Perl_sv_setpv # define Perl_sv_setpvn dll_Perl_sv_setpvn ! # if PERL_REVISION == 5 && PERL_VERSION >= 8 ! # define Perl_sv_setsv_flags dll_Perl_sv_setsv_flags ! # else ! # define Perl_sv_setsv dll_Perl_sv_setsv ! # endif # define Perl_sv_upgrade dll_Perl_sv_upgrade # define Perl_Tstack_sp_ptr dll_Perl_Tstack_sp_ptr # define Perl_Top_ptr dll_Perl_Top_ptr *************** *** 203,218 **** --- 221,249 ---- static bool (*Perl_sv_2bool)(pTHX_ SV*); static IV (*Perl_sv_2iv)(pTHX_ SV*); static SV* (*Perl_sv_2mortal)(pTHX_ SV*); + #if PERL_REVISION == 5 && PERL_VERSION >= 8 + static char* (*Perl_sv_2pv_flags)(pTHX_ SV*, STRLEN*, I32); + static char* (*Perl_sv_2pv_nolen)(pTHX_ SV*); + #else static char* (*Perl_sv_2pv)(pTHX_ SV*, STRLEN*); + #endif static SV* (*Perl_sv_bless)(pTHX_ SV*, HV*); + #if PERL_REVISION == 5 && PERL_VERSION >= 8 + static void (*Perl_sv_catpvn_flags)(pTHX_ SV* , const char*, STRLEN, I32); + #else static void (*Perl_sv_catpvn)(pTHX_ SV*, const char*, STRLEN); + #endif static void (*Perl_sv_free)(pTHX_ SV*); static int (*Perl_sv_isa)(pTHX_ SV*, const char*); static void (*Perl_sv_magic)(pTHX_ SV*, SV*, int, const char*, I32); static void (*Perl_sv_setiv)(pTHX_ SV*, IV); static void (*Perl_sv_setpv)(pTHX_ SV*, const char*); static void (*Perl_sv_setpvn)(pTHX_ SV*, const char*, STRLEN); + #if PERL_REVISION == 5 && PERL_VERSION >= 8 + static void (*Perl_sv_setsv_flags)(pTHX_ SV*, SV*, I32); + #else static void (*Perl_sv_setsv)(pTHX_ SV*, SV*); + #endif static bool (*Perl_sv_upgrade)(pTHX_ SV*, U32); static SV*** (*Perl_Tstack_sp_ptr)(register PerlInterpreter*); static OP** (*Perl_Top_ptr)(register PerlInterpreter*); *************** *** 230,235 **** --- 261,267 ---- static SV* (*Perl_Isv_yes_ptr)(register PerlInterpreter*); static void (*boot_DynaLoader)_((pTHX_ CV*)); + /* * Table of name to function pointer of perl. */ *************** *** 270,285 **** --- 302,330 ---- {"Perl_sv_2bool", (PERL_PROC*)&Perl_sv_2bool}, {"Perl_sv_2iv", (PERL_PROC*)&Perl_sv_2iv}, {"Perl_sv_2mortal", (PERL_PROC*)&Perl_sv_2mortal}, + #if PERL_REVISION == 5 && PERL_VERSION >= 8 + {"Perl_sv_2pv_flags", (PERL_PROC*)&Perl_sv_2pv_flags}, + {"Perl_sv_2pv_nolen", (PERL_PROC*)&Perl_sv_2pv_nolen}, + #else {"Perl_sv_2pv", (PERL_PROC*)&Perl_sv_2pv}, + #endif {"Perl_sv_bless", (PERL_PROC*)&Perl_sv_bless}, + #if PERL_REVISION == 5 && PERL_VERSION >= 8 + {"Perl_sv_catpvn_flags", (PERL_PROC*)&Perl_sv_catpvn_flags}, + #else {"Perl_sv_catpvn", (PERL_PROC*)&Perl_sv_catpvn}, + #endif {"Perl_sv_free", (PERL_PROC*)&Perl_sv_free}, {"Perl_sv_isa", (PERL_PROC*)&Perl_sv_isa}, {"Perl_sv_magic", (PERL_PROC*)&Perl_sv_magic}, {"Perl_sv_setiv", (PERL_PROC*)&Perl_sv_setiv}, {"Perl_sv_setpv", (PERL_PROC*)&Perl_sv_setpv}, {"Perl_sv_setpvn", (PERL_PROC*)&Perl_sv_setpvn}, + #if PERL_REVISION == 5 && PERL_VERSION >= 8 + {"Perl_sv_setsv_flags", (PERL_PROC*)&Perl_sv_setsv_flags}, + #else {"Perl_sv_setsv", (PERL_PROC*)&Perl_sv_setsv}, + #endif {"Perl_sv_upgrade", (PERL_PROC*)&Perl_sv_upgrade}, {"Perl_Tstack_sp_ptr", (PERL_PROC*)&Perl_Tstack_sp_ptr}, {"Perl_Top_ptr", (PERL_PROC*)&Perl_Top_ptr}, *** ../vim61.331/src/version.c Sun Feb 16 22:16:19 2003 --- src/version.c Sun Feb 16 22:17:58 2003 *************** *** 608,609 **** --- 612,615 ---- { /* Add new patch number below this line */ + /**/ + 332, /**/ -- ARTHUR: This new learning amazes me, Sir Bedevere. Explain again how sheep's bladders may be employed to prevent earthquakes. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///