Joe Orton wrote:
On Sun, Apr 04, 2004 at 09:40:18PM -0700, Stas Bekman wrote:

Joe Orton wrote:

OK, let's do the background... on Unix systems where by default off_t is
a "long", a 32-bit integer, there are two different ways to get "large
file" support, i.e. the ability to manipulate files bigger than 2Gb:

Muchas Gracias, Joe. I've committed both your explanation and the logic which now works fine with both, 2.0 and 2.1.


Great.  It looks like mod_perl is not pulling in all the right variables
from apxs though still.  APR HEAD will break if -D_LARGEFILE64_SOURCE is
not defined when including apr.h on many platforms.  On Linux you get
away with it because Perl defines -D_GNU_SOURCE which implies
-D_LARGEFILE64_SOURCE, but this won't happen on Solaris etc.

I can fix it by continuing the copy'n'paste-fest as below, but I had to
change the apxs function to not give errors for a -q output which was
empty, which is not an error in some cases, e.g. -q NOTEST_CFLAGS,
though is an error in others I suppose, -q INCLUDEDIR etc.

Why isn't -D_LARGEFILE64_SOURCE in the normal flags? Asking for obscure NOTEST_* flags doesn't sound very obvious.


By picking up NOTEST_{C,CPP}FLAGS the code to add -DAP_DEBUG and
-DAP_HAVE_DESIGNATED_INITIALIZER could/should now be removed too. AP_HAVE_DESIGNATED_INITIALIZER will be always added when appropriate
with this applied since it's in NOTEST_CPPFLAGS.


I'm not sure it's necessarily safe to add AP_DEBUG if httpd was not
itself built with AP_DEBUG; there were issues with this in the past.

I don't like that idea. Later some other defines will be put there and we will have a macaroni of fishing them out.


What are the chances that -D_LARGEFILE64_SOURCE will migrate to EXTRA_CPPFLAGS, or some other place which can be used as is?

Finally the ccopts function could do with doing some normalization of
the union of the perl/Apache CFLAGS now since "-g -O2 -D_GNU_SOURCE" etc
will be used twice otherwise.

Sure, I'll do that. But is there any harm in those duplicates?


There, I think I've suggested enough work for other people to do now :)

Index: lib/Apache/Build.pm
===================================================================
RCS file: /home/cvspublic/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.158
diff -u -r1.158 Build.pm
--- lib/Apache/Build.pm 5 Apr 2004 04:38:29 -0000 1.158
+++ lib/Apache/Build.pm 5 Apr 2004 08:49:46 -0000
@@ -167,7 +167,7 @@
my $val = qx($apxs @_ 2>$devnull);
chomp $val if defined $val; # apxs post-2.0.40 adds a new line
- unless ($val) {
+ unless ($val || $is_query) {
error "'$apxs @_' failed:";

that obliterates the whole error checking. I suppose one needs to run: my $error = qx($apxs @_ 1>$devnull ); and rerun qx($apxs @_ 2>$devnull) only if there is no error

though it slows things down, as it'll need to run twice as many apxs queries.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

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



Reply via email to