perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/xs/APR/PerlIO Makefile.PL
Date Mon, 12 May 2003 06:37:13 GMT
stas        2003/05/11 23:37:13

  Modified:    .        Changes STATUS
               lib/Apache Build.pm
               lib/ModPerl Manifest.pm
               xs/APR/PerlIO Makefile.PL
  Log:
  an attempt to resolve the binary compatibility problem in
  PerlIOAPR_seek API when APR_HAS_LARGE_FILES=0, by compiling
  APR::PerlIO objects with Config{ccflags_uselargefiles} flags
  
  Revision  Changes    Path
  1.186     +3 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.185
  retrieving revision 1.186
  diff -u -r1.185 -r1.186
  --- Changes	12 May 2003 00:11:24 -0000	1.185
  +++ Changes	12 May 2003 06:37:12 -0000	1.186
  @@ -12,6 +12,9 @@
   
   =item 1.99_10-dev
   
  +an attempt to resolve the binary compatibility problem in
  +PerlIOAPR_seek API when APR_HAS_LARGE_FILES=0 [Stas]
  +
   perl 5.8.0 forgets to export PerlIOBase_noop_fail, causing problems on
   win32 and aix. reimplement this function locally to solve the
   problem. APR::PerlIO should now be useful on win32 and aix [Stas]
  
  
  
  1.53      +1 -4      modperl-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/STATUS,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- STATUS	12 May 2003 00:11:24 -0000	1.52
  +++ STATUS	12 May 2003 06:37:12 -0000	1.53
  @@ -58,9 +58,6 @@
     'File::Find' and search for 'mod_perl.pm' under PREFIX, if found
     check its version and assert only if it's 1.xx
   
  -* apr/perlio.t t7 fails with blead perl w/o ithreads
  -  http://archive.develooper.com/perl5-porters@perl.org/msg93164.html
  -
   * we have shared lib loading problems on the following platforms:
   
       OpenBSD - needs investigation
  
  
  
  1.122     +21 -4     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.121
  retrieving revision 1.122
  diff -u -r1.121 -r1.122
  --- Build.pm	22 Apr 2003 08:32:59 -0000	1.121
  +++ Build.pm	12 May 2003 06:37:13 -0000	1.122
  @@ -874,7 +874,7 @@
   
   my %wanted_apr_config = map { $_, 1} qw(
       HAS_THREADS HAS_DSO HAS_MMAP HAS_RANDOM HAS_SENDFILE
  -    HAS_INLINE HAS_FORK
  +    HAS_LARGE_FILES HAS_INLINE HAS_FORK
   );
   
   sub get_apr_config {
  @@ -1332,12 +1332,29 @@
       "@includes";
   }
   
  -#XXX:
  +# there is no conflict if both libraries either have or don't have
  +# large files support enabled
  +sub has_large_files_conflict {
  +    my $self = shift;
  +    my $apr_config = $self->get_apr_config();
  +
  +    my $perl = $Config{uselargefiles} ? 1 : 0;
  +    my $apr  = $apr_config->{HAS_LARGE_FILES} ? 1 : 0;
  +
  +    return $perl ^ $apr;
  +}
  +
  +# if perl is built with uselargefiles, but apr not, the build won't
  +# work together as it uses two binary incompatible libraries, so
  +# reduce the functionality to the greatest common denominator (C code
  +# will have to make sure to prevent any operations that may rely on
  +# effects created by uselargefiles, e.g. Off_t=8 instead of Off_t=4)
   sub strip_lfs {
       my($self, $cflags) = @_;
  -    return $cflags unless $Config{uselargefiles};
  +    return $cflags unless $self->has_large_files_conflict();
  +
       my $lf = $Config{ccflags_uselargefiles}
  -      || '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64';
  +        || '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64';
       $cflags =~ s/$lf//;
       $cflags;
   }
  
  
  
  1.6       +0 -2      modperl-2.0/lib/ModPerl/Manifest.pm
  
  Index: Manifest.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Manifest.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Manifest.pm	23 Apr 2003 04:17:52 -0000	1.5
  +++ Manifest.pm	12 May 2003 06:37:13 -0000	1.6
  @@ -90,8 +90,6 @@
   patches/
   #very few will have Chatbot::Eliza installed
   eliza
  -# fails with blead perl w/o useithreads
  -t/response/TestAPR/perlio.pm
   # segfaults with blead perl
   t/filter/TestFilter/out_str_req_mix.pm
   t/filter/out_str_req_mix.t
  
  
  
  1.3       +28 -2     modperl-2.0/xs/APR/PerlIO/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/APR/PerlIO/Makefile.PL,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.PL	22 Mar 2003 07:21:37 -0000	1.2
  +++ Makefile.PL	12 May 2003 06:37:13 -0000	1.3
  @@ -1,8 +1,34 @@
   use lib qw(../lib);
   use ModPerl::BuildMM ();
   
  +use Config;
  +use Apache::Build;
  +use Apache::TestTrace;
  +my $build = Apache::Build->build_config();
  +
  +my $ccopts = $build->ccopts;
  +
  +# when uselargefiles is on, -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
  +# are needed to get the right 'Off_t', without which perlio compiled
  +# with Off_t as 'long long int', doesn't quite work with apr_perlio.c
  +# compiled with Off_t as 'long int'
  +#
  +# On the other handl if apr is built without large files support, we
  +# have binary compatibility problems, if we try to build mod_perl with
  +# -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
  +#
  +# XXX: it seems that enabling these flags only for apr_perlio/PerlIO
  +# seems to do the trick
  +if ($build->has_large_files_conflict) {
  +    $ccopts .= $Config{uselargefiles}
  +        ? ' ' . $Config{ccflags_uselargefiles}
  +        : '';
  +}
  +
   ModPerl::BuildMM::WriteMakefile(
  -    NAME => 'APR::PerlIO',
  +    NAME         => 'APR::PerlIO',
       VERSION_FROM => 'PerlIO.pm',
  -    OBJECT => 'PerlIO.o apr_perlio.o');
  +    CCFLAGS      => $ccopts,
  +    OBJECT       => 'PerlIO.o apr_perlio.o'
  +);
   
  
  
  

Mime
View raw message