perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: modperl-2.0/lib/ModPerl CScan.pm
Date Fri, 18 Jun 2004 23:48:35 GMT
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': $!")
  
  
  

Mime
View raw message