Return-Path: Delivered-To: apmail-perl-modperl-cvs-archive@www.apache.org Received: (qmail 44530 invoked from network); 18 Jun 2004 23:48:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 18 Jun 2004 23:48:38 -0000 Received: (qmail 46430 invoked by uid 500); 18 Jun 2004 23:49:01 -0000 Delivered-To: apmail-perl-modperl-cvs-archive@perl.apache.org Received: (qmail 46403 invoked by uid 500); 18 Jun 2004 23:49:00 -0000 Mailing-List: contact modperl-cvs-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@perl.apache.org Delivered-To: mailing list modperl-cvs@perl.apache.org Received: (qmail 46386 invoked by uid 500); 18 Jun 2004 23:49:00 -0000 Delivered-To: apmail-modperl-2.0-cvs@apache.org Date: 18 Jun 2004 23:48:35 -0000 Message-ID: <20040618234835.44517.qmail@minotaur.apache.org> From: randyk@apache.org To: modperl-2.0-cvs@apache.org Subject: cvs commit: modperl-2.0/lib/ModPerl CScan.pm X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N randyk 2004/06/18 16:48:35 Modified: lib/ModPerl CScan.pm Log: Reviewed by: stas Use a different syntax for calling cppstdin on Win32 (using cl -nologo -E for cppstdin). Revision Changes Path 1.4 +4 -2 modperl-2.0/lib/ModPerl/CScan.pm Index: CScan.pm =================================================================== RCS file: /home/cvs/modperl-2.0/lib/ModPerl/CScan.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CScan.pm 15 Jun 2004 17:50:34 -0000 1.3 +++ CScan.pm 18 Jun 2004 23:48:35 -0000 1.4 @@ -3,6 +3,7 @@ require Exporter; use Config '%Config'; use File::Basename; +use constant WIN32 => $^O eq 'MSWin32'; # NOTE to distributors: this module is needed only for mp2 developers, # it's not a requirement for mod_perl users @@ -929,8 +930,9 @@ $addincludes = "-I" . join(" -I", @$Includes) if defined $Includes and @$Includes; my($sym) = gensym; - my $cmd = "echo '\#include \"$filename\"' | $Cpp->{cppstdin} $Defines $addincludes $Cpp->{cppflags} $Cpp->{cppminus} |"; - #my $cmd = "$Cpp->{cppstdin} $Defines $addincludes $Cpp->{cppflags} $Cpp->{cppminus} < $filename |"; + my $cmd = WIN32 ? + "$Cpp->{cppstdin} $Defines $addincludes $Cpp->{cppflags} $filename |" : + "echo '\#include \"$filename\"' | $Cpp->{cppstdin} $Defines $addincludes $Cpp->{cppflags} $Cpp->{cppminus} |"; #my $cmd = "echo '\#include <$filename>' | $Cpp->{cppstdin} $Defines $addincludes $Cpp->{cppflags} $Cpp->{cppminus} |"; (open($sym, $cmd) or die "Cannot open pipe from `$cmd': $!")