Steve Hay wrote:
Index: src/modules/perl/mod_perl.c
===================================================================
--- src/modules/perl/mod_perl.c (revision 151089)
+++ src/modules/perl/mod_perl.c (working copy)
@@ -544,9 +544,9 @@
{
MP_TRACE_i(MP_FUNC, "mod_perl sys init\n");
-#if 0 /*XXX*/
- PERL_SYS_INIT(0, NULL);
+ PERL_SYS_INIT3(0, NULL, NULL);
No -- as I said in my last mail (quoted above) that gives an "Illegal
indirection" error, which is why I was moved to supply some variables
instead.
The full error text is this:
mod_perl.c(547) : error C2100: illegal indirection
mod_perl.c(547) : error C2100: illegal indirection
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
The MSDN docs describe compiler error "C2100: illegal indirection" as
follows:
"The indirection operator (*) was applied to a nonpointer value."
The reason is that on Win32 PERL_SYS_INIT3(a,b,c) is
MALLOC_CHECK_TAINT2(*a,*b);
Perl_win32_init(a,b);
so it's the *a and *b in the MALLOC_CHECK_TAINT2() call which it's
whining about in the case where a and b were non-pointers. So the
obvious fix seemed to be:
PERL_SYS_INIT3((int *)NULL, (char ***)NULL, (char ***)NULL);
This compiles cleanly, but then crashes on startup because now it's
trying to resolve the NULL pointer values!
Explicitly calling
MALLOC_CHECK_TAINT2(0, (char **)NULL);
Perl_win32_init((int *)0, (char ***)NULL);
works (both compiling and running), but that's cheating (and also won't
work on Linux ;)
Any other ideas? If not then can you live with the warnings about
unused variables? That's at least better than the situation for me
without a PERL_SYS_INIT3() call at all ;)
sure, just add to your patch:
/* not every OS uses those vars in PERL_SYS_INIT3 macro */
argc = argc; argv = argv; env = env;
in which case it's fine.
--
__________________________________________________________________
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]