In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/938cfd5cbc71c8edc25160094f2b45a593724fb5?hp=bebf870e6d027ca8a7a3da6a23b4612c5178aae4>
- Log ----------------------------------------------------------------- commit 938cfd5cbc71c8edc25160094f2b45a593724fb5 Author: Steve Hay <[email protected]> Date: Wed May 6 12:50:09 2009 +0100 Fix code before declaration compile error on Win32 The code written out by ExtUtils::Miniperl::writemain() contained the code PERL_UNUSED_CONTEXT; before the declarations const char file[] = __FILE__; dXSUB_SYS; which Win32's VC++ compiler doesn't like. ----------------------------------------------------------------------- Summary of changes: minimod.pl | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/minimod.pl b/minimod.pl index fea77c0..bd945c2 100644 --- a/minimod.pl +++ b/minimod.pl @@ -67,11 +67,12 @@ sub writemain{ print "EXTERN_C void boot_${cname} (pTHX_ CV* cv);\n"; } - my ($tail1,$tail2) = ( $tail =~ /\A(.*\n)(\s*\}.*)\Z/s ); - print $tail1; + my ($tail1,$tail2,$tail3) = ( $tail =~ /\A(.*{\s*\n)(.*\n)(\s*\}.*)\Z/s ); + print $tail1; print "\tconst char file[] = __FILE__;\n"; print "\tdXSUB_SYS;\n" if $] > 5.002; + print $tail2; foreach $_ (@exts){ my($pname) = canon('/', $_); @@ -91,7 +92,7 @@ sub writemain{ } print "\t}\n"; } - print $tail2; + print $tail3; } sub canon{ -- Perl5 Master Repository
