dougm       2002/05/30 19:19:11

  Modified:    t/response/TestAPR perlio.pm
               xs/APR/PerlIO apr_perlio.c
  Log:
  we cannot support passing Off_t from the perl runtime compiled with
  largfile flags into the apr runtime compiled without.
  only APR::PerlIO::seek has this issue, problem can be seen failing
  apr/perlio tests 3-5 on hpux and solaris, and likely elsewhere.
  ok when offset is 0, but nothing else since cast turns it into 0.
  
  Revision  Changes    Path
  1.8       +8 -2      modperl-2.0/t/response/TestAPR/perlio.pm
  
  Index: perlio.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/perlio.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- perlio.pm 11 Apr 2002 11:08:44 -0000      1.7
  +++ perlio.pm 31 May 2002 02:19:11 -0000      1.8
  @@ -22,7 +22,12 @@
           return Apache::OK;
       }
   
  -    plan $r, tests => 14, have_perl 'iolayers';
  +    my $tests = 11;
  +    my $lfs_tests = 3;
  +
  +    #$tests += $lfs_tests if USE_LARGE_FILES; #XXX
  +
  +    plan $r, tests => $tests, have_perl 'iolayers';
   
       my $vars = Apache::Test::config()->{vars};
       my $dir  = catfile $vars->{documentroot}, "perlio";
  @@ -63,7 +68,8 @@
       }
   
       # seek/tell() tests
  -    {
  +    #XXX: feel free to enable if largefile support is not enabled in Perl
  +    if (0) {
           open my $fh, "<:APR", $file, $r 
               or die "Cannot open $file for reading: $!";
   
  
  
  
  1.12      +12 -2     modperl-2.0/xs/APR/PerlIO/apr_perlio.c
  
  Index: apr_perlio.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/APR/PerlIO/apr_perlio.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- apr_perlio.c      6 Mar 2002 05:30:27 -0000       1.11
  +++ apr_perlio.c      31 May 2002 02:19:11 -0000      1.12
  @@ -159,7 +159,17 @@
       apr_seek_where_t where;
       apr_status_t rc;
       IV code;
  -    
  +    apr_off_t seek_offset = 0;
  +
  +#ifdef USE_LARGE_FILES
  +    if (offset != 0) {
  +        Perl_croak(aTHX_ "PerlIO::APR::seek with non-zero offset"
  +                   " not supported with -Duselargefiles");
  +    }
  +#else
  +    seek_offset = offset;
  +#endif
  +
       /* Flush the fill buffer */
       code = PerlIOBuf_flush(aTHX_ f);
       if (code != 0) {
  @@ -178,7 +188,7 @@
           break;
       }
   
  -    rc = apr_file_seek(st->file, where, (apr_off_t *)&offset);
  +    rc = apr_file_seek(st->file, where, &seek_offset);
       if (rc == APR_SUCCESS) {
           return 0;
       }
  
  
  


Reply via email to