[changing title again...]
Stas Bekman wrote:
One other explanation could be type sizes mismatch between perl and apr, but I don't see anything like this happening in here. Though this is something that needs to be checked. Usually this happens if apache and perl are not both build with large_files or w/o. e.g. we have this problem in apr/perlio's seek function. I was passing the value to seek to and the function would convert it to zero. later with help of Nick S.I. from p5p I have learned that the problem was in the type mismatch, perl was passing 64 bit int and apr was accepting 32 bit int, and voila some kind of truncation/alignment was happening.
In any case can you check whether you have both perl and apache built with largefiles or both without? Just check whether you have MP_LARGE_FILES_CONFLICT defined in src/modules/perl/mod_perl.h
Index: src/modules/perl/mod_perl.h =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v retrieving revision 1.60 diff -u -r1.60 mod_perl.h --- src/modules/perl/mod_perl.h 20 Aug 2003 23:20:14 -0000 1.60 +++ src/modules/perl/mod_perl.h 19 Sep 2003 09:11:47 -0000 @@ -43,6 +43,10 @@ #define MP_LARGE_FILES_CONFLICT \ !(MP_LARGE_FILES_ENABLED || MP_LARGE_FILES_DISABLED)
+#ifdef MP_LARGE_FILES_CONFLICT +#error "Large files conflict!" +#endif + #ifdef MP_USE_GTOP #include "modperl_gtop.h" #endif
if it fails to compile you have this conflict.
Yikes! I have a large files conflict!
I specifically built my Perl *with* large files support, believing that Apache2 had it. (And conversely, I've always built Perl *without* LFS when I'm using mp1 because Apache1 doesn't have it.) Is this not the case?
Do I need to do anything special to enable LFS in either Apache2 or mp2? Or should I just rebuild Perl without LFS?
Hmm. It seems that I don't actually have a large files conflict after all - the above patch reported that I did have, but it is wrong!
I think the "#ifdef MP_LARGE_FILES_CONFLICT" should have been "'#if MP_LARGE_FILES_CONFLICT" (i.e. we need to test the truth of that flag, not its definedness), but that alone didn't fix it - there seems to be a problem with the definition of the four MP_LARGE_FILES_* flags beforehand anyway, at least on Win32.
Witness this:
===== #define ONE 1 #define TWO 1
#define BOTH (defined(ONE) && TWO)
#if defined(ONE)
# pragma message("ONE is defined")
#else
# pragma message("ONE is not defined")
#endif#if TWO
# pragma message("TWO is true")
#else
# pragma message("TWO is not true")
#endif#if BOTH
# pragma message("BOTH is true")
#else
# pragma message("BOTH is not true")
#endifvoid main(void) { }
=====Compiling this with MSVC++ 6 produces the following output:
ONE is defined TWO is true BOTH is not true
It seems that it doesn't like "defined(ONE)". If I change the definition of BOTH above to:
#define BOTH ((defined ONE) && TWO)
then the output is now as expected:
ONE is defined TWO is true BOTH is true
The attached patch fixes that. Now with the following check in place:
#if MP_LARGE_FILES_CONFLICT #error "Large files conflict!" #endif
I get no error about large files conflict.
The filter/both_str_con_add, hooks/stacked_handlers and modules\include tests all still fail, though :-(
- Steve
--- mod_perl.h.orig 2003-08-21 00:20:14.000000000 +0100 +++ mod_perl.h 2003-09-19 13:24:39.935392000 +0100 @@ -23,19 +23,19 @@ /* both perl and apr have largefile support enabled */ #define MP_LARGE_FILES_ENABLED \ - (defined(USE_LARGE_FILES) && APR_HAS_LARGE_FILES) + ((defined USE_LARGE_FILES) && APR_HAS_LARGE_FILES) /* both perl and apr have largefile support disabled */ #define MP_LARGE_FILES_DISABLED \ - (!defined(USE_LARGE_FILES) && !APR_HAS_LARGE_FILES) + ((!defined USE_LARGE_FILES) && !APR_HAS_LARGE_FILES) /* perl support is enabled, apr support is disabled */ #define MP_LARGE_FILES_PERL_ONLY \ - (defined(USE_LARGE_FILES) && !APR_HAS_LARGE_FILES) + ((defined USE_LARGE_FILES) && !APR_HAS_LARGE_FILES) /* apr support is enabled, perl support is disabled */ #define MP_LARGE_FILES_APR_ONLY \ - (!defined(USE_LARGE_FILES) && APR_HAS_LARGE_FILES) + ((!defined USE_LARGE_FILES) && APR_HAS_LARGE_FILES) /* conflict due to not have either both perl and apr * support enabled or both disabled
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
