You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axkit-dev@xml.apache.org by ma...@apache.org on 2002/06/04 09:51:54 UTC

cvs commit: xml-axkit Makefile.PL AxKit.xs

matts       2002/06/04 00:51:54

  Modified:    .        Makefile.PL AxKit.xs
  Log:
  Attempt to fix largefile strangeness
  
  Revision  Changes    Path
  1.7       +14 -1     xml-axkit/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/xml-axkit/Makefile.PL,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Makefile.PL	2 Apr 2002 16:27:53 -0000	1.6
  +++ Makefile.PL	4 Jun 2002 07:51:54 -0000	1.7
  @@ -1,4 +1,4 @@
  -# $Id: Makefile.PL,v 1.6 2002/04/02 16:27:53 matts Exp $
  +# $Id: Makefile.PL,v 1.7 2002/06/04 07:51:54 matts Exp $
   
   package AxKit;
   # file Makefile.PL
  @@ -50,6 +50,7 @@
   }
   
   require Apache::src;
  +require Apache::MyConfig;
   
   my $xml_parser_found = 0;
   
  @@ -229,6 +230,10 @@
   
   my %prereq_pm = %{delete $config{PREREQ_PM}||{}};
   
  +unless ($Apache::MyConfig::Setup{PERL_USELARGEFILES} == 1) {
  +    $config{CFLAGS} = strip_lfs($config{CFLAGS});
  +}
  +
   foreach my $k (keys %config) {
       push @ARGV, "$k=$config{$k}";
   }
  @@ -274,6 +279,14 @@
       else {
           $RUNNING_UNDER_CPAN = $ENV{RUNNING_UNDER_CPAN} || 0;
       }
  +}
  +
  +sub strip_lfs {
  +    my($cflags) = @_;
  +    return $cflags unless $Config{uselargefiles};
  +    my $lf = $Config{ccflags_uselargefiles} || '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64';
  +    $cflags =~ s/$lf//;
  +    $cflags;
   }
   
   sub rm_f {
  
  
  
  1.5       +6 -2      xml-axkit/AxKit.xs
  
  Index: AxKit.xs
  ===================================================================
  RCS file: /home/cvs/xml-axkit/AxKit.xs,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AxKit.xs	2 Jun 2002 18:41:54 -0000	1.4
  +++ AxKit.xs	4 Jun 2002 07:51:54 -0000	1.5
  @@ -1,4 +1,4 @@
  -/* $Id: AxKit.xs,v 1.4 2002/06/02 18:41:54 matts Exp $ */
  +/* $Id: AxKit.xs,v 1.5 2002/06/04 07:51:54 matts Exp $ */
   
   #ifdef __cplusplus
   extern "C" {
  @@ -218,7 +218,11 @@
           HV * config;
           
           if (r == NULL) {
  -            croak("Unexpected request_rec = NULL");
  +            croak("_get_config: Unexpected request_rec = NULL");
  +        }
  +
  +        if (r->per_dir_config == NULL) {
  +            croak("_get_config: Unexpected per_dir_config = NULL");
           }
           
           cfg = (axkit_dir_config *)