]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
AP_ENABLE_V4_MAPPED with WinNT MPM
authorJeff Trawick <trawick@apache.org>
Tue, 12 Apr 2011 15:26:25 +0000 (15:26 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 12 Apr 2011 15:26:25 +0000 (15:26 +0000)
  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

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1091467 13f79535-47bb-0310-9956-ffa450edef68

configure.in
server/mpm/winnt/mpm_winnt.c

index 8afe224cbe770545afef092e8eab705f7a00182b..93d6029dc7673b9fe0286cf06cfa0198830515ce 100644 (file)
@@ -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" = "1"; then
               [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)
index 777f0e57abcd26da21f8f461eb5759e803c76c13..0d68ea3bc48bb61d4c082d6943f9f0e95dce5398 100644 (file)
 #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.
  */