Add MSVC 'for' scoping hack to rest of Lucy
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/6c854a02 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/6c854a02 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/6c854a02 Branch: refs/heads/msvc6 Commit: 6c854a02f58a34a1e36f5a0c8b2ae7d248191ad0 Parents: e88ede1 Author: Nick Wellnhofer <[email protected]> Authored: Sun Nov 4 16:08:48 2012 +0100 Committer: Nick Wellnhofer <[email protected]> Committed: Sun Nov 4 16:08:48 2012 +0100 ---------------------------------------------------------------------- .../compiler/perl/lib/Clownfish/CFC/Perl/Build.pm | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/6c854a02/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm ---------------------------------------------------------------------- diff --git a/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm b/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm index 97e85cd..099838f 100644 --- a/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm +++ b/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm @@ -65,8 +65,10 @@ sub new { elsif ( $self->config('cc') =~ /^cl\b/ ) { # Compile as C++ under MSVC. push @$extra_ccflags, qw( - /TP -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS + -TP -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS ); + # Redefine 'for' to fix broken 'for' scoping under MSVC6. + push @$extra_ccflags, '-Dfor="if(0);else for"'; } $self->extra_compiler_flags(@$extra_ccflags);
