Stas Bekman wrote:

Good catch, Steve. I guess I have missed that because on linux Apache always builds without LARGE_FILES and there is no way to enable it, so apr/perlio.t has a hard-coded value of 1. Does the test work for you if you set the conflict constant to 0 in that test? We really need to provide a APR::LARGE_FILES_CONFLICT constant from mod_perl.

Yes - the extra tests all pass too (15 now instead of just 12). Phew!




Though I'd like to be it defined(), so can you please try this patch?

OK. I tried out your patch (below) and it all works fine. (I put in some extra #pragma message("...") lines to double-check that everything was being set correctly, which it is.)


- Steve

I also fixed the logic of setting MP_LARGE_FILES_CONFLICT, I think it's correct now:

-   !(MP_LARGE_FILES_ENABLED || MP_LARGE_FILES_DISABLED)
+   defined(MP_LARGE_FILES_APR_ONLY) || defined(MP_LARGE_FILES_PERL_ONLY)


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 17:08:59 -0000 @@ -22,26 +22,31 @@ #include "modperl_constants.h"

 /* both perl and apr have largefile support enabled */
-#define MP_LARGE_FILES_ENABLED \
-   (defined(USE_LARGE_FILES) && APR_HAS_LARGE_FILES)
+#if defined(USE_LARGE_FILES) && APR_HAS_LARGE_FILES
+#define MP_LARGE_FILES_ENABLED
+#endif

 /* both perl and apr have largefile support disabled */
-#define MP_LARGE_FILES_DISABLED \
-   (!defined(USE_LARGE_FILES) && !APR_HAS_LARGE_FILES)
+#if (!defined(USE_LARGE_FILES)) && !APR_HAS_LARGE_FILES
+#define MP_LARGE_FILES_DISABLED
+#endif

-/* perl support is enabled, apr support is disabled */
-#define MP_LARGE_FILES_PERL_ONLY \
-   (defined(USE_LARGE_FILES) && !APR_HAS_LARGE_FILES)
+/* perl largefile support is enabled, apr support is disabled */
+#if defined(USE_LARGE_FILES) && !APR_HAS_LARGE_FILES
+#define MP_LARGE_FILES_PERL_ONLY
+#endif

-/* apr support is enabled, perl support is disabled */
-#define MP_LARGE_FILES_APR_ONLY \
-   (!defined(USE_LARGE_FILES) && APR_HAS_LARGE_FILES)
+/* apr largefile support is enabled, perl support is disabled */
+#if (!defined(USE_LARGE_FILES)) && APR_HAS_LARGE_FILES
+#define MP_LARGE_FILES_APR_ONLY
+#endif

/* conflict due to not have either both perl and apr
* support enabled or both disabled
*/
-#define MP_LARGE_FILES_CONFLICT \
- !(MP_LARGE_FILES_ENABLED || MP_LARGE_FILES_DISABLED)
+#if defined(MP_LARGE_FILES_APR_ONLY) || defined(MP_LARGE_FILES_PERL_ONLY)
+#define MP_LARGE_FILES_CONFLICT
+#endif


 #ifdef MP_USE_GTOP
 #include "modperl_gtop.h"
Index: xs/APR/PerlIO/apr_perlio.c
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/APR/PerlIO/apr_perlio.c,v
retrieving revision 1.33
diff -u -r1.33 apr_perlio.c
--- xs/APR/PerlIO/apr_perlio.c    4 Sep 2003 23:57:58 -0000    1.33
+++ xs/APR/PerlIO/apr_perlio.c    19 Sep 2003 17:09:00 -0000
@@ -224,7 +224,7 @@
     apr_status_t rc;
     apr_off_t seek_offset = 0;

-#if MP_LARGE_FILES_CONFLICT
+#ifdef MP_LARGE_FILES_CONFLICT
if (offset != 0) {
Perl_croak(aTHX_ "PerlIO::APR::seek with non-zero offset"
"is not supported with Perl built w/ -Duselargefiles"




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



Reply via email to