Attached is a diff for the cvs mod_perl-1 Makefile.PL to define
PERL_SECTIONS=1 for Win32 - t/modules/psections.t passes. The
fact that PERL_SECTIONS was =0 for Win32 was pointed out by Dirk
Maetens <[EMAIL PROTECTED]>. This Makefile.PL diff also
includes a couple of diffs sent earlier - one to set
PERL_DIRECTIVE_HANDLERS=1 for Win32 when built without an
APACHE_SRC argument, and a perl substitute for touch().
Also attached is a diff for some files in src/modules/perl/ to
get rid of some warnings on Win32 - these are some type
mismatches and unused variables. For one a DWTYPE is defined to
be 'unsigned char' for Win32 and I32 otherwise - this is related
to the type of dowarn. The only warning left on Win32 is in
ModuleConfig.xs, in vector_from_sv - not all control paths return
a value - and I wasn't sure what would be appropriate here.
--
best regards,
randy
Index: Makefile.PL
===================================================================
RCS file: /home/cvspublic/modperl/Makefile.PL,v
retrieving revision 1.204
diff -u -r1.204 Makefile.PL
--- Makefile.PL 19 Jun 2002 16:31:52 -0000 1.204
+++ Makefile.PL 23 Sep 2002 02:08:48 -0000
@@ -479,6 +479,7 @@
if($Is_Win32) {
$NO_HTTPD = 1;
+ $PERL_DIRECTIVE_HANDLERS = 1;
}
@@ -791,7 +792,8 @@
"(need 1.2.0 or higher)";
}
- $PERL_SECTIONS = $PERL_SSI = 0 if $Is_Win32;
+# $PERL_SECTIONS = $PERL_SSI = 0 if $Is_Win32;
+ $PERL_SSI = 0 if $Is_Win32;
unless ($Is_Win32) {
for (qw(PERL_SECTIONS PERL_SSI), keys %experimental) {
$k = $_;
@@ -1600,7 +1602,10 @@
my $to = '$(INST_ARCHLIB)/' . "auto/Apache/include/$_";
unless ($self->{PM}->{$from}) {
$self->{PM}->{$from} = $to;
- system "$Config{touch} $from";
+ my @args = ($Config{perlpath}, '-MExtUtils::Command', '-e', 'touch',
+$from);
+ system(@args) == 0
+ or die "system @args failed: $?";
+# system "$Config{touch} $from";
}
}
Index: mod_perl.c
===================================================================
RCS file: /home/cvspublic/modperl/src/modules/perl/mod_perl.c,v
retrieving revision 1.145
diff -u -r1.145 mod_perl.c
--- mod_perl.c 23 May 2002 04:35:16 -0000 1.145
+++ mod_perl.c 23 Sep 2002 03:43:22 -0000
@@ -1099,8 +1099,8 @@
static void per_request_cleanup(request_rec *r)
{
dPPREQ;
- perl_request_sigsave **sigs;
- int i;
+ /* perl_request_sigsave **sigs; */
+ /* int i; */
if(!cfg) {
return;
Index: perl_config.c
===================================================================
RCS file: /home/cvspublic/modperl/src/modules/perl/perl_config.c,v
retrieving revision 1.114
diff -u -r1.114 perl_config.c
--- perl_config.c 24 Mar 2002 22:51:04 -0000 1.114
+++ perl_config.c 23 Sep 2002 03:43:23 -0000
@@ -392,7 +392,7 @@
perl_request_config *perl_create_request_config(pool *p, server_rec *s)
{
- int i;
+ /* int i; */
perl_request_config *cfg =
(perl_request_config *)pcalloc(p, sizeof(perl_request_config));
cfg->pnotes = Nullhv;
@@ -1528,7 +1528,7 @@
{
I32 alen = AvFILL(av);
I32 i, j;
- I32 oldwarn = dowarn; /*XXX, hmm*/
+ DWTYPE oldwarn = dowarn; /*XXX, hmm*/
dowarn = FALSE;
if(!n) n = alen+1;
Index: perl_util.c
===================================================================
RCS file: /home/cvspublic/modperl/src/modules/perl/perl_util.c,v
retrieving revision 1.49
diff -u -r1.49 perl_util.c
--- perl_util.c 15 May 2002 02:08:16 -0000 1.49
+++ perl_util.c 23 Sep 2002 03:43:24 -0000
@@ -470,7 +470,7 @@
dPSRV(s);
HV *hash = GvHV(incgv);
HE *entry;
- I32 old_warn = dowarn;
+ DWTYPE old_warn = dowarn;
pool *p = ap_make_sub_pool(sp);
table *reload = ap_make_table(p, HvKEYS(hash));
char **entries;
@@ -573,10 +573,10 @@
/*(void)hv_delete(GvHV(incgv), pv, strlen(pv), G_DISCARD);*/
}
-int perl_load_startup_script(server_rec *s, pool *p, char *script, I32 my_warn)
+int perl_load_startup_script(server_rec *s, pool *p, char *script, DWTYPE my_warn)
{
dTHR;
- I32 old_warn = dowarn;
+ DWTYPE old_warn = dowarn;
if(!script) {
MP_TRACE_d(fprintf(stderr, "no Perl script to load\n"));
@@ -719,7 +719,7 @@
errpv = SvPVX(errsv);
for(i=0;i<=2;i++) {
- if(i >= SvCUR(errsv))
+ if(i >= (int) SvCUR(errsv))
break;
if(isDIGIT(SvPVX(errsv)[i]))
http_code++;
@@ -738,7 +738,7 @@
}
/* nothin but 3 digits */
- if(SvCUR(errsv) == http_code)
+ if((int) SvCUR(errsv) == http_code)
return TRUE;
ap_cpystrn((char *)cpcode, errpv, 4);
Index: mod_perl.h
===================================================================
RCS file: /home/cvspublic/modperl/src/modules/perl/mod_perl.h,v
retrieving revision 1.116
diff -u -r1.116 mod_perl.h
--- mod_perl.h 23 May 2002 04:35:16 -0000 1.116
+++ mod_perl.h 23 Sep 2002 03:43:25 -0000
@@ -64,6 +64,12 @@
#endif
#endif
+#ifdef WIN32
+#define DWTYPE unsigned char
+#else
+#define DWTYPE I32
+#endif
+
#ifndef IS_MODULE
#define IS_MODULE
#endif
@@ -1174,7 +1180,7 @@
I32 perl_module_is_loaded(char *name);
SV *perl_module2file(char *name);
int perl_require_module(char *module, server_rec *s);
-int perl_load_startup_script(server_rec *s, pool *p, char *script, I32 my_warn);
+int perl_load_startup_script(server_rec *s, pool *p, char *script, DWTYPE my_warn);
array_header *perl_cgi_env_init(request_rec *r);
void perl_clear_env(void);
void mp_magic_setenv(char *key, char *val, int is_tainted);
@@ -1318,3 +1324,4 @@
#undef stderr
#define stderr PerlIO_stderr()
#endif
+
Index: Apache.xs
===================================================================
RCS file: /home/cvspublic/modperl/src/modules/perl/Apache.xs,v
retrieving revision 1.125
diff -u -r1.125 Apache.xs
--- Apache.xs 6 Jul 2001 20:33:35 -0000 1.125
+++ Apache.xs 23 Sep 2002 03:43:26 -0000
@@ -1002,7 +1002,7 @@
if (should_client_block(r)) {
(void)SvUPGRADE(buffer, SVt_PV);
- SvGROW(buffer, bufsiz+1);
+ SvGROW(buffer, (STRLEN) bufsiz+1);
nrd = get_client_block(r, SvPVX(buffer), bufsiz);
}
r->read_length += old_read_length;
@@ -1041,7 +1041,7 @@
PPCODE:
(void)SvUPGRADE(buffer, SVt_PV);
- SvGROW(buffer, bufsiz+1);
+ SvGROW(buffer, (STRLEN)bufsiz+1);
nrd = get_client_block(r, SvPVX(buffer), bufsiz);
if ( nrd > 0 ) {
XPUSHs(sv_2mortal(newSViv((long)nrd)));
Index: Constants.xs
===================================================================
RCS file: /home/cvspublic/modperl/src/modules/perl/Constants.xs,v
retrieving revision 1.20
diff -u -r1.20 Constants.xs
--- Constants.xs 30 Mar 2000 00:44:40 -0000 1.20
+++ Constants.xs 23 Sep 2002 03:43:27 -0000
@@ -906,7 +906,7 @@
#endif
char *name = EXP_NAME;
double val = constant(name);
- my_newCONSTSUB(stash, name, newSViv(val));
+ my_newCONSTSUB(stash, name, newSViv((I32)val));
}
}
@@ -955,7 +955,7 @@
if(errno != 0)
croak("Your vendor has not defined Apache::Constants macro `%s'", name);
else
- my_newCONSTSUB(stash, name, newSViv(val));
+ my_newCONSTSUB(stash, name, newSViv((I32)val));
const char *
SERVER_VERSION()
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]