httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject Re: [apreq-2] $upload->tempname on Win32
Date Mon, 05 Jul 2004 07:20:02 GMT
On Sun, 4 Jul 2004, Joe Schaefer wrote:

> Markus Wichitill <mawic@gmx.de> writes:
>
> [...]
> > How many people will really get a seekable APR::PerlIO
> > handle? My SuSE 9.0 box is a run-of-the-mill Linux
> > system, and those handles are not seekable because Perl
> > by default compiles with largefile support and APR
> > doesn't.
> >
> > "[Sun Jul 04 18:57:14 2004] [error] PerlIO::APR::seek
> > with non-zero offsetis not supported with Perl built w/
> > -Duselargefiles and APR w/o largefiles support"
>
> IMO what we need now (since I've already committed the
> change) is for fh() to decide when to pass "<:APR" to
> open, and when to pass "<".
>
> Patches only, please.  At this point I'm very tired of
> futzing with fh() support, because these problems are
> really not within apreq2's domain.

Not quite a patch yet, as I'm not sure I appreciate
everything involved. mp2's Apache::Build has a sub
has_large_files_conflict(), with the embedded comments
indicating that it decides whether or not such a conflict
exists. If that's the case, then could something like the
following:
=======================================================
#!/opt/bin/perl
use strict;
use warnings;
use Apache2;
use Apache::Build();
use Config;
$Apache::Build::APXS = '/opt/httpd/bin/apxs';
print has_large_files_conflict();

sub has_large_files_conflict {
  my $b = Apache::Build->new();
  my $apxs_flags = join $b->apxs('-q' => 'EXTRA_CFLAGS'),
     $b->apxs('-q' => 'EXTRA_CPPFLAGS');
  my $apr_lfs64 = $apxs_flags =~ /-D_FILE_OFFSET_BITS=64/;
  my $perl_lfs64 = $Config{ccflags} =~ /-D_FILE_OFFSET_BITS=64/;
  return $perl_lfs64 ^ $apr_lfs64;
}
=================================================================
(with $Apache::Build::APXS adjusted to the given apxs
utility) be used to decide if a conflict exists, and
if so, use '<', rather than '<:APR', in constructing
the filehandle in Apache::Upload's fh()?

-- 
best regards,
randy

Mime
View raw message