? mc.diff
Index: INSTALL.win32
===================================================================
RCS file: /home/cvspublic/modperl/INSTALL.win32,v
retrieving revision 1.7
diff -u -r1.7 INSTALL.win32
--- INSTALL.win32	2001/06/21 16:11:42	1.7
+++ INSTALL.win32	2001/07/09 05:46:05
@@ -151,6 +151,10 @@
 
 will complete the installation.
 
+This latter method of building mod_perl will also install the
+Apache and mod_perl header files, which can then be accessed
+through the Apache::src module.
+
 =head1 CONFIGURATION
 
 Add this line to httpd.conf:
Index: Makefile.PL
===================================================================
RCS file: /home/cvspublic/modperl/Makefile.PL,v
retrieving revision 1.190
diff -u -r1.190 Makefile.PL
--- Makefile.PL	2001/07/06 20:08:27	1.190
+++ Makefile.PL	2001/07/09 05:46:33
@@ -354,7 +354,14 @@
     $callback_hooks{$k} = $v if exists $callback_hooks{$k};
 }
 
-my $win32_auto = ($vcpp and $win32_args{APACHE_SRC}) ? 1 : 0;
+my $win32_auto;
+if ($vcpp and $win32_args{APACHE_SRC}) {
+  $EVERYTHING = 1;
+  my $fixed_apsrc = win32_fix_path($win32_args{APACHE_SRC}); 
+  $APACHE_SRC =  -d "$fixed_apsrc/include" ?
+    $fixed_apsrc  : $fixed_apsrc . '/src';
+  $win32_auto = 1;
+}
 
 my %very_experimental = map {$_,1} 
 qw(PERL_DEFAULT_OPMASK PERL_SAFE_STARTUP PERL_ORALL_OPMASK 
@@ -774,7 +781,9 @@
 	    "(need 1.2.0 or higher)";
     }
 
-    for (qw(PERL_SECTIONS PERL_SSI), keys %experimental) {
+    $PERL_SECTIONS = $PERL_SSI = 0 if $Is_Win32;
+    unless ($Is_Win32) {
+      for (qw(PERL_SECTIONS PERL_SSI), keys %experimental) {
 	$k = $_;
 
 	if($experimental{$_}) {
@@ -797,6 +806,7 @@
 	    iedit "$APACHE_SRC/modules/perl/Makefile", "s/^($_) /#\$1 /"
 		if $$_;
 	}
+      }
     }
     unless ($USE_APACI or $USE_APXS) {
 	iedit "$APACHE_SRC/modules/perl/Makefile", "s/^#TRACE/TRACE/" if $PERL_TRACE;
@@ -877,7 +887,7 @@
 	iedit "$APACHE_SRC/modules/perl/Makefile", "s/^#__ORIGINAL__/$edit_note/";
     }
 
-    if($mmn >= 19970912 and not $USE_APACI and not $USE_APXS) {     #1.3b1
+    if($mmn >= 19970912 and not $USE_APACI and not $USE_APXS and not $Is_Win32) {     #1.3b1
 	system "cat $APACHE_SRC/Makefile.config $APACHE_SRC/modules/perl/Makefile > /tmp/mpmf.$$";
 	system "mv /tmp/mpmf.$$ $APACHE_SRC/modules/perl/Makefile";
     }
@@ -887,7 +897,7 @@
 	"\t", '$(CP) t/conf/mod_perl_srm.conf t/conf/srm.conf', "\n";
     }
     unless ($USE_APXS) {
-	unless (-l "t/httpd") {
+	unless (-l "t/httpd" or $Is_Win32) {
 	    system "$Config{lns} $APACHE_SRC/httpd t/httpd";
 	}
 	write_extra_tests();
@@ -1088,6 +1098,10 @@
     my $dummy = "hooks=`$hooks'\n" unless $hooks;
     cp "lib/mod_perl_hooks.pm.PL", "lib/mod_perl_hooks.pm"; 
 
+    if ($Is_Win32) {
+      my @args = ($^X, ' -spi.bak ', ' -e ', "\"s/sub mod_perl::hooks.*/sub mod_perl::hooks { qw($hooks) }/\"", 'lib/mod_perl_hooks.pm');
+      system(@args) == 0 or die "@args failed\n";
+    }
     iedit "lib/mod_perl_hooks.pm", 
     qq(s/sub mod_perl::hooks.*/sub mod_perl::hooks { qw($hooks) }/);
 
@@ -1099,7 +1113,7 @@
 	@list == @mod_perl_hooks or die "Edit of lib/mod_perl_hooks.pm failed $!\n";
     }
 
-    unlink "lib/mod_perl_hooks.pm~";
+    unlink $Is_Win32 ? "lib/mod_perl_hooks.pm.bak" : "lib/mod_perl_hooks.pm~";
 }
 
 #checking for LWP code, borrowed from LWP's own Makefile.PL :-)
@@ -1183,7 +1197,15 @@
     }
 
     mkdir "t/docs/subr", 0755;
-    system "date > t/docs/subr/index.html";
+    if ($Is_Win32) {
+      open FH, ">t/docs/subr/index.html" 
+	or die "Cannot open t/docs/subr/index.html: $!";
+      print FH scalar(localtime);
+      close FH;
+    }
+    else {
+      system "date > t/docs/subr/index.html";
+    }
 
     return unless 
 	$callback_hooks{PERL_STACKED_HANDLERS} 
@@ -1524,6 +1546,18 @@
     $My::self->{PM}->{$from} = $to;
 }
 
+sub win32_mph {
+    return unless /\.h$/ or /os-inline\.c$/;
+    (my $d = $File::Find::dir) =~ s:^\Q$MODPERL_SRC::;
+    $d =~ s:^/::;
+    my $from = "$File::Find::dir/$_";
+    my $to   = '$(INST_ARCHLIB)/' . "auto/Apache/include/modules/perl/";
+    $to .= "$d/" if $d;
+    $to .= $_;
+
+    $My::self->{PM}->{$from} = $to;
+}
+
 sub MY::post_initialize {
     my($self) = shift;
 
@@ -1545,6 +1579,10 @@
 	local $APACHE_SRC = $ap_src;
 	finddepth(\&wanted, $ap_src);
     }
+    if ($Is_Win32) {
+      	local $MODPERL_SRC = win32_fix_path($PWD) . '/src/modules/perl';
+	finddepth(\&win32_mph, $MODPERL_SRC);
+    }
     $self->{PM}{"Apache/typemap"} = '$(INST_ARCHLIB)/' . "auto/Apache/typemap";
     $self->{PM}{"apaci/mod_perl.exp"} = '$(INST_ARCHLIB)/' . "auto/Apache/mod_perl.exp";
     for (qw(ap_config_auto.h)) {
@@ -2010,6 +2048,7 @@
         for (qw(APACHE_INC APACHE_LIB MODPERL_INC MODPERL_LIB)) {
             $my_config{$_} = $win32_path{$_};
         }
+	$my_config{APACHE_SRC} = $APACHE_SRC;
     }
 
     #need this alias for Apache::src backwards compat
Index: lib/Apache/src.pm
===================================================================
RCS file: /home/cvspublic/modperl/lib/Apache/src.pm,v
retrieving revision 1.27
diff -u -r1.27 src.pm
--- lib/Apache/src.pm	2000/09/26 20:16:52	1.27
+++ lib/Apache/src.pm	2001/07/09 05:46:39
@@ -91,7 +91,7 @@
 
 sub mmn_eq {
     my($class, $dir) = @_;
-    return 1 if $Is_Win32; #just assume, till Apache::src works under win32 
+#    return 1 if $Is_Win32; #just assume, till Apache::src works under win32 
     my $instsrc;
     {
 	local @INC = grep { !/blib/ } @INC;
Index: src/modules/win32/mod_perl.def
===================================================================
RCS file: /home/cvspublic/modperl/src/modules/win32/mod_perl.def,v
retrieving revision 1.3
diff -u -r1.3 mod_perl.def
--- src/modules/win32/mod_perl.def	2001/07/06 17:19:52	1.3
+++ src/modules/win32/mod_perl.def	2001/07/09 05:46:39
@@ -12,3 +12,5 @@
    perl_perl_cmd_cleanup
    hvrv2table
    perl_call_handler
+   perl_clear_symtab
+   perl_get_startup_pool
Index: src/modules/win32/mod_perl.dsp
===================================================================
RCS file: /home/cvspublic/modperl/src/modules/win32/mod_perl.dsp,v
retrieving revision 1.3
diff -u -r1.3 mod_perl.dsp
--- src/modules/win32/mod_perl.dsp	2001/04/27 17:01:54	1.3
+++ src/modules/win32/mod_perl.dsp	2001/07/09 05:46:40
@@ -111,6 +111,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=..\perl\ModuleConfig.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\perl\mod_perl.c
 # End Source File
 # Begin Source File
Index: t/conf/httpd.conf-win32
===================================================================
RCS file: /home/cvspublic/modperl/t/conf/httpd.conf-win32,v
retrieving revision 1.11
diff -u -r1.11 httpd.conf-win32
--- t/conf/httpd.conf-win32	2001/04/27 17:01:55	1.11
+++ t/conf/httpd.conf-win32	2001/07/09 05:46:41
@@ -36,6 +36,8 @@
 
 PerlRequire docs/startup.pl
 
+PerlRequire docs/stacked.pl
+
 PerlTransHandler PerlTransHandler
 
 
@@ -274,4 +276,9 @@
 <Location /death>
 PerlHandler Apache::Death
 SetHandler perl-script
+</Location>
+
+<Location /chain>
+SetHandler perl-script
+PerlHandler Stacked::one Stacked::two Stacked::three Stacked::four
 </Location>
Index: t/modules/src.t
===================================================================
RCS file: /home/cvspublic/modperl/t/modules/src.t,v
retrieving revision 1.2
diff -u -r1.2 src.t
--- t/modules/src.t	1998/03/19 23:09:04	1.2
+++ t/modules/src.t	2001/07/09 05:46:42
@@ -5,7 +5,7 @@
 
 my $i = 0;
 
-skip_test if WIN32;
+# skip_test if WIN32;
 
 print "1..6\n";
 

