Steve Hay wrote:
[...]
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 :-(

At least we are fixing another problem on the way ;) So the effort wasn't wasted.


--- 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

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.


Though I'd like to be it defined(), so can you please try this patch? 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"


__________________________________________________________________ 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