Dear Bram > Patch 7.0.044 > Problem: Perl: setting a buffer line in another buffer may result in > changing the current buffer. > Solution: Properly change to the buffer to be changed. > Files: src/if_perl.xs > > [...] > Alas, if I want to compile this, I get the following output
---%<--- "C:\Program Files\ActivePerl\Bin\perl" "C:\Program Files\ActivePerl\lib\ExtUtils\xsubpp" -prototypes -typemap "C:\Program Files\ActivePerl\lib\ExtUtils\typemap" -typemap typemap if_perl.xs > if_perl.c cl -c /W3 /nologo -D_MT -MT -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_SNIFF -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_XPM_W32 -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 /Fo.\ObjGOL/ /Ox -DNDEBUG /G6 -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DGLOBAL_IME -DFEAT_MBYTE -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_PERL -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl58.dll\" -DFEAT_HUGE /Zi /Fd.\ObjGOL/ /I "C:\Program Files\ActivePerl\Lib\Core" if_perl.c cl : Command line warning D9002 : ignoring unknown option '/G6' if_perl.c if_perl.xs(1075) : error C2275: 'buf_T' : illegal use of this type as an expression c:\software\vim\vim70\src\structs.h(1133) : see declaration of 'buf_T' if_perl.xs(1075) : error C2065: 'save_curbuf' : undeclared identifier if_perl.xs(1088) : warning C4047: '=' : 'buf_T *' differs in levels of indirection from 'int' if_perl.xs(1089) : warning C4047: '=' : 'buf_T *' differs in levels of indirection from 'int' if_perl.xs(1187) : error C2275: 'buf_T' : illegal use of this type as an expression c:\software\vim\vim70\src\structs.h(1133) : see declaration of 'buf_T' if_perl.xs(1200) : warning C4047: '=' : 'buf_T *' differs in levels of indirection from 'int' if_perl.xs(1201) : warning C4047: '=' : 'buf_T *' differs in levels of indirection from 'int' NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. --->%--- I inspected if_perl.xs and if_perl.c and saw that xsubpp simply removed preprocessor directives such as > ! #ifdef FEAT_AUTOCMD > out of the code without really make a decision between the #if or #else: Both parts were left. I then found http://perldoc.perl.org/perlxs.html#Inserting-POD%2c-Comments-and-C-Preprocessor-Directives I will make my patch to get this working With kind regards Mathias