You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@apache.org on 2002/02/21 02:50:41 UTC

cvs commit: modperl-2.0/lib/Apache ParseSource.pm

dougm       02/02/20 17:50:41

  Modified:    lib/Apache ParseSource.pm
  Log:
  c-scan chokes on netinet/tcp.h, add a -D_NETINET_TCP_H to trick cpp
  into skipping inclusion of it.
  add comments for other defines.
  
  Revision  Changes    Path
  1.35      +14 -3     modperl-2.0/lib/Apache/ParseSource.pm
  
  Index: ParseSource.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/ParseSource.pm,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- ParseSource.pm	20 Jan 2002 18:36:07 -0000	1.34
  +++ ParseSource.pm	21 Feb 2002 01:50:41 -0000	1.35
  @@ -50,6 +50,12 @@
       }
   }
   
  +my @c_scan_defines = (
  +    'CORE_PRIVATE',   #so we get all of apache
  +    'MP_SOURCE_SCAN', #so we can avoid some c-scan barfing
  +    '_NETINET_TCP_H', #c-scan chokes on netinet/tcp.h
  +);
  +
   sub scan {
       require C::Scan;
       C::Scan->VERSION(0.75);
  @@ -61,11 +67,16 @@
   
       $c->set(includeDirs => $self->includes);
   
  -    my $defines = '-DCORE_PRIVATE -DMP_SOURCE_SCAN';
  +    my @defines = @c_scan_defines;
  +
       unless ($Config{useithreads} and $Config{useithreads} eq 'define') {
  -        $defines .= ' -DMP_SOURCE_SCAN_NEED_ITHREADS';
  +        #fake -DITHREADS so function tables are the same for
  +        #vanilla and ithread perls, that is,
  +        #make sure THX and friends are always expanded
  +        push @defines, 'MP_SOURCE_SCAN_NEED_ITHREADS';
       }
  -    $c->set(Defines => $defines);
  +
  +    $c->set(Defines => join ' ', map "-D$_", @defines);
   
       bless $c, 'Apache::ParseSource::Scan';
   }