The concrete proposal:

1. mod_perl should be extracting the output of `apr-config --cflags`
`apr-config --cppflags` at some point.  This can either be done by using
apr-config directly, or by getting it out of `apxs -q EXTRA_CFLAGS` and
`apxs -q EXTRA_CPPFLAGS`.

(apxs in 2.0 sucks really because `apxs -q CFLAGS` doesn't tell you
everything it should)

2. given this, has_large_files_conflict can *accurately* detect the
conflict situation, given $apxs_cflags which contains all the above
{EXTRA_CPP,EXTRA_C,C}_FLAGS variables, and $perl_cflags which is Perl's
$Config{ccflags}:

  my $apr_lfs64 = 0, $perl_lfs64 = 0;

  $apr_lfs64 = 1 if $apxs_cflags =~ /-D_FILE_OFFSET_BITS=64/;
  $perl_lfs64 = 1 if $perl_cflags =~ /-D_FILE_OFFSET_BITS=64/;

  if ($perl_lfs64 && !$apr_lfs64) {
     # Serious Conflict!  Strip -D_FILE_OFFSET_BITS=64 from $perl_cflags.
  }
  elsif (!$perl_lfs64 && $apr_lfs64) {
     # Less serious conflict; this case isn't handled currently.
     # Don't strip anything from CFLAGS but still do the apr_file_seek
     # workaround, I think
  }

Building APR in the manner to give the "less serious conflict" is really
an unsupported configuration, and didn't work before httpd-2.0.49
anyway, so it would be OK to just give an error on that extremely
unlikely situation.

This avoids needing to ever look at APR_HAS_LARGE_FILES, so should fix
the issue with APR HEAD, and should work fine for 2.0.x too.

joe

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to