Commit cbc7df28 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1091467 13f79535-47bb-0310-9956-ffa450edef68
parent a9925fcd
Loading
Loading
Loading
Loading
+25 −22
Changes for configure.in: 25 added lines, 22 removed lines.
Original line number Diff line number Diff line
@@ -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)
+10 −0
Changes for server/mpm/winnt/mpm_winnt.c: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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.
 */