view auto/os/win32 @ 5360:3d2d3e1cf427

Win32: MinGW GCC compatibility. Several warnings silenced, notably (ngx_socket_t) -1 is now checked on socket operations instead of -1, as ngx_socket_t is unsigned on win32 and gcc complains on comparison. With this patch, it's now possible to compile nginx using mingw gcc, with options we normally compile on win32.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 04 Sep 2013 20:48:28 +0400
parents d620f497c50f
children 4dc8e7b62216
line wrap: on
line source


# Copyright (C) Igor Sysoev
# Copyright (C) Nginx, Inc.


have=NGX_WIN32 . auto/have_headers

CORE_INCS="$WIN32_INCS"
CORE_DEPS="$WIN32_DEPS"
CORE_SRCS="$WIN32_SRCS $IOCP_SRCS"
OS_CONFIG="$WIN32_CONFIG"
NGX_ICONS="$NGX_WIN32_ICONS"
SELECT_SRCS=$WIN32_SELECT_SRCS

case "$NGX_CC_NAME" in

    gcc)
        CORE_LIBS="$CORE_LIBS -ladvapi32 -lws2_32"
    ;;

    *)
        CORE_LIBS="$CORE_LIBS advapi32.lib ws2_32.lib"
    ;;

esac

EVENT_MODULES="$EVENT_MODULES $IOCP_MODULE"
EVENT_FOUND=YES

if [ $EVENT_SELECT = NO ]; then
    CORE_SRCS="$CORE_SRCS $SELECT_SRCS"
    EVENT_MODULES="$EVENT_MODULES $SELECT_MODULE"
fi

if [ $NGX_IPV6 = YES ]; then
    have=NGX_HAVE_INET6 . auto/have
fi

have=NGX_HAVE_AIO . auto/have
have=NGX_HAVE_IOCP . auto/have