dougm       01/01/21 10:19:57

  Modified:    lib/Apache Build.pm
               src/modules/perl modperl_perl_includes.h
  Log:
  make runnable with uselargefiles
  
  Revision  Changes    Path
  1.27      +11 -6     modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Build.pm  2001/01/04 07:23:17     1.26
  +++ Build.pm  2001/01/21 18:19:56     1.27
  @@ -23,7 +23,8 @@
       my $build = $self->build_config;
       my $apxs;
       my @trys = ($Apache::Build::APXS,
  -             $build->{MP_APXS});
  +                $build->{MP_APXS},
  +                $ENV{MP_APXS});
   
       unless (IS_MOD_PERL_BUILD) {
        #if we are building mod_perl via apxs, apxs should already be known
  @@ -120,7 +121,7 @@
   sub ccopts {
       my($self) = @_;
   
  -    ExtUtils::Embed::ccopts() . $self->ap_ccopts;
  +    $self->strip_lfs(ExtUtils::Embed::ccopts()) . $self->ap_ccopts;
   }
   
   sub perl_config {
  @@ -788,10 +789,14 @@
       "@includes";
   }
   
  -sub ccflags {
  -    my $self = shift;
  -    my $cflags = $Config{'ccflags'};
  -    join ' ', $cflags, $self->apxs('-q' => 'CFLAGS');
  +#XXX:
  +sub strip_lfs {
  +    my($self, $cflags) = @_;
  +    return $cflags unless $Config{uselargefiles};
  +    my $lf = $Config{ccflags_uselargefiles}
  +      || '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64';
  +    $cflags =~ s/$lf//;
  +    $cflags;
   }
   
   sub define {
  
  
  
  1.3       +12 -4     modperl-2.0/src/modules/perl/modperl_perl_includes.h
  
  Index: modperl_perl_includes.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_includes.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_perl_includes.h   2001/01/18 18:45:57     1.2
  +++ modperl_perl_includes.h   2001/01/21 18:19:56     1.3
  @@ -1,5 +1,5 @@
  -#ifndef MODPERL_PERL_INCLUDES
  -#define MODPERL_PERL_INCLUDES
  +#ifndef MODPERL_PERL_INCLUDES_H
  +#define MODPERL_PERL_INCLUDES_H
   
   /* header files for Perl */
   
  @@ -8,8 +8,16 @@
   #endif
   
   #define PERLIO_NOT_STDIO 0
  -#define PERL_CORE
   
  +/*
  + * sizeof(struct PerlInterpreter) changes #ifdef USE_LARGE_FILES
  + * apache-2.0 cannot be compiled with lfs because of sendfile.h
  + * the PERL_CORE optimization is a no-no in this case
  + */
  +#if defined(USE_ITHREADS) && !defined(USE_LARGE_FILES)
  +#   define PERL_CORE
  +#endif
  +
   #include "EXTERN.h"
   #include "perl.h"
   #include "XSUB.h"
  @@ -31,4 +39,4 @@
   #undef dNOOP
   #define dNOOP extern int __attribute__ ((unused)) Perl___notused
   
  -#endif /* MODPERL_PERL_INCLUDES */
  +#endif /* MODPERL_PERL_INCLUDES_H */
  
  
  

Reply via email to