You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2011/04/12 17:26:25 UTC

svn commit: r1091467 - in /httpd/httpd/trunk: configure.in server/mpm/winnt/mpm_winnt.c

Author: trawick
Date: Tue Apr 12 15:26:25 2011
New Revision: 1091467

URL: http://svn.apache.org/viewvc?rev=1091467&view=rev
Log:
AP_ENABLE_V4_MAPPED with WinNT MPM

  mpm_winnt.c: Fail to compile if enabled, and add a hint about the
               issue to address before it will work.
  configure.in: Move the --enable-v4-mapped check to below the
                MPM logic, and default to --disable-v4-mapped if
                using the WinNT MPM

Modified:
    httpd/httpd/trunk/configure.in
    httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c

Modified: httpd/httpd/trunk/configure.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/configure.in?rev=1091467&r1=1091466&r2=1091467&view=diff
==============================================================================
--- httpd/httpd/trunk/configure.in (original)
+++ httpd/httpd/trunk/configure.in Tue Apr 12 15:26:25 2011
@@ -512,28 +512,6 @@ esac
 
 APACHE_SUBST(DTRACE)
 
-APR_CHECK_APR_DEFINE(APR_HAVE_IPV6)
-
-AC_ARG_ENABLE(v4-mapped,APACHE_HELP_STRING(--enable-v4-mapped,Allow IPv6 sockets to handle IPv4 connections),
-[ 
-  v4mapped=$enableval
-],
-[
-    case $host in
-    *freebsd5*|*netbsd*|*openbsd*)
-        v4mapped=no
-        ;;
-    *)
-        v4mapped=yes
-        ;;
-esac
-])
-
-if test $v4mapped = "yes" -a $ac_cv_define_APR_HAVE_IPV6 = "yes"; then
-    AC_DEFINE(AP_ENABLE_V4_MAPPED, 1,
-              [Allow IPv4 connections on IPv6 listening sockets])
-fi
-
 AC_ARG_ENABLE(exception-hook,APACHE_HELP_STRING(--enable-exception-hook,Enable fatal exception hook),
 [
     AC_DEFINE(AP_ENABLE_EXCEPTION_HOOK, 1,
@@ -714,6 +692,31 @@ if test "$AP_NONBLOCK_WHEN_MULTI_LISTEN"
               [Listening sockets are non-blocking when there are more than 1])
 fi
 
+APR_CHECK_APR_DEFINE(APR_HAVE_IPV6)
+
+AC_ARG_ENABLE(v4-mapped,APACHE_HELP_STRING(--enable-v4-mapped,Allow IPv6 sockets to handle IPv4 connections),
+[ 
+  v4mapped=$enableval
+],
+[
+    case $host in
+    *freebsd5*|*netbsd*|*openbsd*)
+        v4mapped=no
+        ;;
+    *)
+        v4mapped=yes
+        ;;
+    esac
+    if ap_mpm_is_enabled winnt; then
+        dnl WinNT MPM doesn't support this.
+        v4mapped=no
+    fi
+])
+
+if test $v4mapped = "yes" -a $ac_cv_define_APR_HAVE_IPV6 = "yes"; then
+    AC_DEFINE(AP_ENABLE_V4_MAPPED, 1,
+              [Allow IPv4 connections on IPv6 listening sockets])
+fi
 
 APACHE_FAST_OUTPUT(Makefile modules/Makefile srclib/Makefile) 
 APACHE_FAST_OUTPUT(os/Makefile server/Makefile)

Modified: httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c?rev=1091467&r1=1091466&r2=1091467&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c Tue Apr 12 15:26:25 2011
@@ -48,6 +48,16 @@
 #define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000
 #endif
 
+/* Because ap_setup_listeners() is skipped in the child, any merging
+ * of [::]:80 and 0.0.0.0:80 for AP_ENABLE_V4_MAPPED in the parent
+ * won't have taken place in the child, so the child will expect to
+ * read two sockets for "Listen 80" but the parent will send only
+ * one.
+ */
+#ifdef AP_ENABLE_V4_MAPPED
+#error The WinNT MPM does not currently support AP_ENABLE_V4_MAPPED
+#endif
+
 /* scoreboard.c does the heavy lifting; all we do is create the child
  * score by moving a handle down the pipe into the child's stdin.
  */